Reputation: 71
I have a problem with ImageView on example 1. the width is fix-310dp and height is wrap_content. And when users load picture (e.g 1920x2560) in ImageView from their gallery it should be as an example 2. On which way to solve this problem?
Upvotes: 0
Views: 60
Reputation: 57702
Try to use the attribute android:adjustViewBounds="true"
on your ImageView
.
Update:
You need to set the scaleType to matrix and after that call setImageMatrix() with your matrix as a parameter.
mImageView.setScaleType(ImageView.ScaleType.MATRIX);
mImageView.setImageMatrix(myMatrix);
Upvotes: 1