Start Android 1. Basic concept of Picture view (ImageView) 2, <InameView/> and ImageView 3. Magical ScaleType Properties When the picture size does not match the ImageView size, you can adjust the position of the picture with the ImageView control by this property.
Android: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/center is centered on the original size of the image, and when the picture is longer/wider than the length/width of the view, the center portion of the image is displayed
Center_crop/centercrop proportionally enlarges the size of the image so that the image is long (wide) equal to or greater than the length (width) of the view
Center_inside/centerinside Displays 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 view
Fit_center/fitcenter enlarge/Shrink the picture to the width of the view, centered on the display
Fit_end/fitend Zoom in/out to the width of the view, displayed in the lower part of the view
Fit_start/fitstart enlarge/Shrink the image to the width of the view, displayed in the upper part of the view
Fit_xy/fitxy The picture is not scaled up/down to the view size display
The Matrix/matrix is drawn with a matrix and is displayed by zooming in and out of the image.
Note that the name of the image in the Drawable folder cannot be capitalized.
1. Use <ImageView/> tags in XML files
2. Use ImageView object representation in code