How do i fill the ImageView
with bitmap that maintain the aspect ratio ? If I'm using scaleType="centerCrop"
it crops the top of the image, I want it to crop the right and the bottom sides. Thanks.
Asked
Active
Viewed 1,585 times
2

Mickey Tin
- 3,408
- 10
- 42
- 71
-
You can change the scaleType to "matrix" and then move/resize the bitmap in the imageview using the matrix. – Inneke De Clippel Nov 27 '14 at 14:51
-
Refer to this site for more info about scaletypes http://etcodehome.blogspot.pt/2011/05/android-imageview-scaletype-samples.html – Pedro Oliveira Nov 27 '14 at 14:52
-
have you found a solution ? – natsumiyu Oct 24 '16 at 08:13
1 Answers
-1
You could read into this:
Link to adjustViewBounds @ Android Developer
Theres also a similar question here that has been solved with a detailed explanation: