Question

We have an app which is using some images bigger than existing products screens. We have two test device for android applications. Also we have emaulators using Android 4.3 and 4.2.2 .

Samsung Galaxy S3 / Android 4.1.2 Samsung Galaxy Tab 10.1/ Android 4.0.4

Each device,we tried to implement our app.The problem is our image has 1237x1602 pixels size but the screen size is 720x1230 for Samsung Galaxy S3 and 800x1280 pixels. That is why our image displayed cropped horizantally and vertically. We want to put whole image and translate it. We create layout programmatically and give the biggest Rect possible but nothing solved.

How can I solve this issue?

Thanks,

MK

No correct solution

OTHER TIPS

Ok you can try this, as per your comments you do not want to crop image so try creating Matrix of your image and resizing it. It wont crop your image.

Matrix m = new Matrix();
imageView.setScaleType(ScaleType.MATRIX);
m.postscale(/*give your scaling here as per requirement*/);
imageView.setImageMatrix(m);

Try it out as it worked for me.

Try this:

imageView.setScaleType(ScaleType.FIT_XY);
imageView.setAdjustViewBounds(true);

before that set ImageView height and width as per you will need. I think your problem will be solved.

Try and give feedback.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top