change background of an ImageView (the old image stays there!)

Posted by nourdine on Stack Overflow See other posts from Stack Overflow or by nourdine
Published on 2010-04-27T21:11:22Z Indexed on 2010/04/27 21:13 UTC
Read the original article Hit count: 167

Filed under:

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

© Stack Overflow or respective owner

Related posts about android