官方描述:
http://developer.android.com/intl/zh-cn/reference/android/widget/ImageView.ScaleType.html
center
在视图中使图像居中,不执行缩放。 无论图片大小,放置居中。


centerCrop
保持原始比例缩放图片,使图片的原来高宽都大于等于视图坐标,图片居中。


centerInside
保持原始比例缩放图片,使图片的原来高宽都小于等于视图坐标,图片居中。


fitCenter
保持原始比例缩放图片,使高度或宽度达到坐标的最大值。


fitEnd
保持原始比例缩放图片,使高度或宽度达到坐标的最大值。显示右下部分。


fitStart
保持原始比例缩放图片,使高度或宽度达到坐标的最大值。显示左上部分。


fitXY
拉伸图片,填充满整个ImageView


matrix
不改变原图的大小,从ImageView的左上角开始绘制原图,原图超过ImageView的部分作裁剪处理。图像矩阵可以通过 setImageMatrix(Matrix) 设置。


网友评论