Reputation: 933
I have an ImageView that is too big for my screen. I want it to start on the left side and continue outside of screen.
Right now I use
scaleType = "centerCrop"
but it's not what I want.
Right now I have
But what I want is
Any clue for me? Thanks
Edit Here's what it does with fitStart:
Upvotes: 0
Views: 191
Reputation: 1296
You might want to use
scaleType = "fitStart"
see https://developer.android.com/reference/android/widget/ImageView.ScaleType.html
EDIT
Maybe set adjustViewBounds = true
https://developer.android.com/reference/android/widget/ImageView.html#attr_android:adjustViewBounds
Upvotes: 0
Reputation: 933
I've been able to do what I wanted with the use of matrix.
I reused the code from that answer:
https://stackoverflow.com/a/6333518/5749193
But instead of going with the width, I went with the height to calculate the scaleFactor.
Hope it might help someone else!
Upvotes: 1