There is no built-in scale type that allows the ImageView
to automatically upscale the image and keep its aspect ratio intact. The only scale type that does upscaling is fitXY
, which won’t respect the aspect ratio, as you found out yourself too.
That being said, this topic has already been visited more than once. Have a look at some of the proposed suggestions for similar questions:
- ImageView one dimension to fit free space and second evaluate to keep aspect ration
- Fit image into ImageView, keep aspect ratio and then resize ImageView to image dimensions?
- Resizing ImageView to fit to aspect ratio
I’m sure’ll be heaps more, so it might worth using the search box at the top.