I'm creating an app that downloads pictures from the web and shows them in a ImageView. I want to resize the image in the imageview proportionaly, so I used this code in 2.3.6 to accomplish this:
mImage.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
mImage.setAdjustViewBounds(true);
mImage.setScaleType(ScaleType.FIT_CENTER );
This worked pretty well, but on 4.1.2 (I don't have other versions of android 4.x) this seems to have no effect. The picture remains at top/left of the screen and without any resizing applied. Do anybody know what is happening? Did chang anything on 4.1.2 about this? Documentations doesn't state anything about it.
Thanks in advance.