Reputation: 25
I set a background resource to a image view then I tried to set a bitmap image to the same image view but then the bitmap image is appearing on top of the background resource. How can i remove this background resource and set a bitmap image
Upvotes: 1
Views: 1093
Reputation: 3190
When you use setBipmap(bitmap)
. It actually set like a android:src="IMAGE"
. So it's overlapping to your background image. So, you have 2 choices.
android:src="@drawable/IMAGE"
. So whe you set the bitmap it won't overlap.imageView.setBackground(new BitmapDrawable(getResources(), BIMAP));
Upvotes: 1