3

I have long image with resolution 400x760 pixels and I put it in imageview with android:adjustViewBounds="true", so there are no white spaces around and image will stretch. It worked on my 4.4 Android, but when i tried it on 4 Android, it was small and didn't stretch. Even in Eclipse Graphical Layout tab, when I have version 19, it works fine, but when I change it to version 17 (Android 4.2.2.), it's small. So how can I make it to work on older androids too?

Edit : That stretching is doing because I have adjustViewBounds="true", but here is XML code:

<ImageView 
    android:id="@+id/calculations"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    android:src="@drawable/calculations" /> 
chiastic-security
  • 20,430
  • 4
  • 39
  • 67
  • Any chance you could include your code so we can see how you're doing the stretching? – Alex K Oct 25 '14 at 16:03
  • This worked for me https://github.com/triposo/barone/blob/master/src/com/triposo/barone/ScalingImageView.java from http://stackoverflow.com/questions/7719617/imageview-adjustviewbounds-not-working/7732684#7732684 – zeiteisen Mar 31 '15 at 10:35

0 Answers0