Hi all,
When I try to set image using
iv.setImageDrawable(getResources().getDrawable(R.drawable.up));
iv.setAdjustViewBounds(true);
iv.setLayoutParams(new
Gallery.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
the image view still shows the image which I have defined in the
xml file.
<ImageView
android:id="@+id/dem_icon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="6dip"
android:src="@drawable/down" />
res/drawable has the following two icons up.png, down.png.
R.java has the following content
public static final class drawable {
public static final int down=0x7f020000;
public static final int icon=0x7f020001;
public static final int up=0x7f020002;
}
the method is called, because in the next line I am change text of a
TextView which is working fine. But the image always shows 'down.png'
Thanks
DM
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en