change background of an ImageView (the old image stays there!)
android
Solution
You don't need to touch the XML to use src instead of background!
An ImageView can display two drawables! One in the background and other in the foreground. It seems that you are always changing the background image.
Instead of `setBackgroundResource(resId)` use `setImageResource(resId)` to change the foreground image!
Problem
how can I change the background of an ImageView from java? I have an ImageView and at a certain point I need to change the image that it displays (set in the styles). I tried to do it like this: ``` placeHolder.setImageDrawable(myDrawb); ``` but it looks like the old image remains there and it is partially covered but the new one (which in my case has different shape). hope you guys can help! cheers