ImageView.ScaleType的所有缩放属性的介绍
ImageView.ScaleType | CENTER |
Center the image in the view, but perform no scaling. 图片不进行放大缩小且居中于视图 |
ImageView.ScaleType | CENTER_CROP |
Scale the image uniformly (maintain the image\’s aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). 图片进行放大缩小且居中于视图,放大缩小宽度和高度将等于或大于视图的对应尺寸 |
ImageView.ScaleType | CENTER_INSIDE |
Scale the image uniformly (maintain the image\’s aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). 图片进行放大缩小且居中于视图,放大缩小宽度和高度将等于或小于视图的对应尺寸 |
ImageView.ScaleType | FIT_CENTER |
Scale the image using 填充于屏幕中间,并等比例缩放 |
ImageView.ScaleType | FIT_END |
Scale the image using 填充于屏幕下方,并等比例缩放 |
ImageView.ScaleType | FIT_START |
Scale the image using 填充于屏幕上方,并等比例缩放 |
ImageView.ScaleType | FIT_XY | Scale the image using FILL . 充满视图 |
ImageView.ScaleType | MATRIX | Scale using the image matrix when drawing. 用视图矩阵去画图 |
以下图片摘抄 http://www.cnblogs.com/yejiurui/archive/2013/02/25/2931767.html
CENTER效果:
CENTER_CROP效果:
CENTER_INSIDE效果:
FIT_CENTER效果:
FIT_START效果:
FIT_END效果:
FIT_XY效果:
MATRIX效果:
如果错误,欢迎指正。