The attribute of the ImageView is Android:scaletype, which is Imageview.setscaletype (Imageview.scaletype).
Android:scaletype is a size that controls how the picture resized/moved to the ImageView.
The meaning difference of Imageview.scaletype/android:scaletype value:
Center/centerCentered on the original size of the picture, when the picture is longer/wider than the length/width of the view, the center portion of the image is displayedCenter_crop/centercropProportionally enlarges the size of the image so that the image is long (wide) equal to or greater than the length (width) of the viewCenter_inside/centerinsideCenter the contents of the picture in full, by scaling it down or the original size to make the picture long/wide equal to or less than the length/width of the viewFit_center/fitcenterEnlarges/shrinks the image to the width of the view, centered on the displayFit_end/fitendEnlarges/shrinks the image to the width of the view, displayed in the lower part of the viewFit_start/fitstartEnlarges/shrinks the image to the width of the view, displayed in the upper part of the viewFit_xy/fitxyPut the picturedo not scale up/down to view size displayMatrix/matrixUse a matrix to draw
Properties of the ImageView Android:scaletype