Learning Android Development
Android ImageView ScaleType Fully Illustrated
Clear all confusion of Android Image ScaleType
Published in
9 min readSep 17, 2020
I thought I know what Android ImageView ScaleType behavior is until I see the below. Sometimes the CenterInside is the same as FitCenter. Sometimes the CenterInside is the same as the Center. Confusing?! 🧐
If you search the internet, the above differences are not described clearly. So I decided to flush out my confusion entirely by providing a full illustration of all ScaleType that behave differently across different sizes of images.
Images Size Type
To fully illustrated them, I have to use there are 4 types of images
- Bigger Image: Both height and width of the image are bigger than the Device View. I use the waterfall image for this.
- Smaller Image: Both height and width of the image are smaller than the Device View. I use the lion image for this.
- Taller Image: Only the height of the image is bigger than the device, the width is smaller. I use the tree image for this.