Adjustviewbounds: When this property is true, you can maintain the aspect ratio of the picture when you adjust the ImageView boundary (it needs to be used with maxheight or maxwidth).
ScaleType: property to represent the way the picture is displayed, there are 8 kinds of values Scaletype.center, Scaletype.center_crop,scaletype.center_inside, Scaletype.fit_ CENTER, Scaletype.fit_end, Scaletype.fit_start, Scaletype.fit_xy, Scaletype.matrix. Of these 8 kinds of values, the last matrix is a 3x3 matrix that zooms in on the picture.
The ImageView width and height of the experiment selected here is 150DP. There are two pictures selected, one for the size of 400x589, and the other for the horizontal version of 60x43. The results are as follows:
1.CENTER: The image size is the original size, if the picture size is larger than the ImageView control, the middle part of the picture is truncated, if less, the picture is centered directly.
2.center_crop: The picture is scaled so that the short edge of the image is the same as the edge length of the ImageView, that is, it cannot be left blank, and the middle part is displayed after zooming.
3.center_inside: The picture size is larger than the ImageView picture is scaled down, until the entire picture can be centered in the ImageView, less than the imageview of the picture is not changed, directly centered display.
4.fit_center:imageview the default state, large picture, etc., so that the whole picture can be centered in the ImageView, small graphs and other proportional amplification, the same overall center display in the ImageView.
5.fit_end: Zoom in the same way as Fit_center, just display the picture on the right or bottom instead of the center.
6.fit_start: Zoom in the same way as Fit_center, just display the picture on the left or top rather than centered.
7.fit_xy: Scales the picture proportionally to the same size as the ImageView.