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 CENTER

填充于屏幕中间,并等比例缩放

ImageView.ScaleType  FIT_END 

Scale the image using END

填充于屏幕下方,并等比例缩放

ImageView.ScaleType  FIT_START 

Scale the image using START

填充于屏幕上方,并等比例缩放

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效果:

clip_image002[4]

CENTER_CROP效果:

clip_image003[4]

CENTER_INSIDE效果:

clip_image004[4]

FIT_CENTER效果:

clip_image005[4]

FIT_START效果:

clip_image006[4]

FIT_END效果:

clip_image007[4]

FIT_XY效果:

clip_image008[4]

MATRIX效果:

clip_image009[4]

 

如果错误,欢迎指正。

版权声明:本文为guzhicao原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/guzhicao/articles/4798391.html