Hi, everyone: I've run into a very strange problem with some code I'm working on. First, here's my layout:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/widget28" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" > <TextView android:id="@+id/friendName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:layout_margin="2px" android:text="Insert Name Here" android:textSize="10sp"> </TextView> <TextView android:id="@+id/timeStamp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_alignParentTop="true" android:layout_toRightOf="@id/friendName" android:layout_margin="2px" android:textSize="10sp"> </TextView> <ImageView android:id="@+id/icon" android:layout_width="48px" android:layout_height="48px" android:layout_below="@+id/friendName" android:layout_alignParentLeft="true" android:src="@drawable/icon" android:layout_margin="2px"> </ImageView> <TextView android:id="@+id/myText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_alignTop="@+id/widget31" android:layout_toRightOf="@id/widget31" android:layout_margin="2px" android:textSize="12sp"> </TextView> </RelativeLayout> I'm trying to change data and images in my layout. First, when I try: TextView friendNameView = (TextView) view.findViewById (R.id.friendName); It works great. It returns a TextView object and I can manipulate it as expected. However, when I try: ImageView iconView = (ImageView) view.findViewById(R.id.icon); It always returns a null value. I thought I might have a wrong resource id, but I've double checked it and it appears correct. Any ideas why I can't seem to grab this object, or if there's anything else I need to double check? Thanks! Mark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

