In my code, I load an image from the source code into my ImageView. ScaleType of this image is FIT_CENTER. My original image is much larger than the screen. Can I get the width and height or scale ratio of the image on the screen? I can do this manually, how, based on the orientation of the image, calculate the ratio of the area in which the ImageView is located and the ratio of the image itself. After the relationship, I can guess what sizes are set (e.g. width or height) and so on ...
Is there any other easy way to do this?
zmeda source
share