1 Imageview.setscaletype (ImageView.ScaleType.FIT_XY);
1 Here we focus on understanding ImageView's attribute Android:scaletype, namely 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:
2
3 Center/center by the original size of the picture, when the picture is longer/wider than the length/width of the view, then the center portion of the image is displayed
4
5 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
6
7 Center_inside/centerinside Display 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
8
9 fit_center/fitcenter Enlarge/Shrink the picture to the width of the view, centered on the display
10
Fit_end/fitend to zoom in/out of the image to the width of the view, shown in the lower part of the view
12
Fit_start/fitstart Enlarge/Shrink the image to the width of the view, displayed in the upper part of the view
14
Fit_xy/fitxy The picture is not scaled up/down to the view size display
16
Matrix/matrix using matrices to draw
At first I did not understand matrix matrices, the web search found that the original matrix can be scaled to zoom the image to display, here do not expand in-depth understanding, just post related statements, reduce the image:
4
10
3 android:layout_width= "Fill_parent"
4
5
6