Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.
weiyi.li edited this page Jul 24, 2017 · 2 revisions

View Tutorial

ImageView

android:scaleType

codes

ScaleType Summary
center NOT scale, so the image will be displayed NOT completely if image size is larger than ImageView.
centerInside ONLY Scale down the image uniformly (maintain the image's aspect ratio), so the image will be displayed completely.
centerCrop Scale to fill the requested bounds of the ImageView and then crop the extra.
fitCenter Scale up / down the image uniformly (maintain the image's aspect ratio), so the image will be displayed completely.
1x 0.5x 1.5x
1x 0.5x 0.5x
Clone this wiki locally