It took me a while to figure out, but it's not ScaleType.FIT_XY that does the trick but FIT_CENTER.
FIT_XY will stretch both width and height to fit the ImageView.
Remember to use ImageView.setImageDrawable() or setImageBitmap() rather than setBackgroundDrawable().

No comments:
Post a Comment
Leave your thoughts ...
---
If you are having trouble with copy/pasting in comments, you need to sign in or click 'Preview'.
For more information about this Firefox bug, see here.