Sunday, 8 November 2015

android image view fit the screen width



if you have a large image like this. (very large one)




if you want to show this image and let android to auto-scale it to match the width of the screen.

you can:

android:scaleType="fitStart"

But that will show like this: (witch scaled by height still very high)




to fix that you should do:


android:scaleType="fitStart"

android:adjustViewBounds="true"






No comments:

Post a comment