The property Android: scaletype of imageview, that is, imageview. setscaletype (imageview. scaletype ). Android: scaletype controls how images are resized/moved to match the size of imageview. Imageview. scaletype/Android: the differences between scaletype values:
Center/center is centered according to the original size of the image. When the length/width of the image exceeds the length/width of the view, the center part of the screenshot is displayed.
Center_crop/centercrop scales up the image size in the center, so that the image length (width) is equal to or greater than the view length (width)
Center_inside/centerinside shows the entire content of the image in the center. The image length/width is equal to or less than the view length/width by proportional reduction or the original size.
Fit_center/fitcenter scales up/down the image proportionally to the width of the view and center the image.
Fit_end/fitend: scales up or down an image to the width of the view, which is displayed in the lower part of the view.
Fit_start/fitstart scales up/down an image proportionally to the width of the view.
Fit_xy/fitxy increase or decrease the image size proportionally to the view size.
Matrix/matrix is drawn using a matrix.