Android Question Imageview to show photo as unchanged as possible

gunnarjonsson

Member
Licensed User
Longtime User
Hi All!
I have a panel with an embedded imageview. In designer I have set the size of the imageview equal to the panels size.
I would like to show my photos in the imageview centered but with the best possible resolution ie if photo is in portrait mode the photo should cover almost the whole imageview and when it is in landscape it should show a much smaller image with a width that precisely covers the width of the image view and a resultant height. I have so far tried all the settings of the gravity but always end up with distorted images , either very large ones that show only part of the original or images that are somehow distorted.
does anyone have an idea how to achieve this?
Gunnar
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…