The ScaleType property is often used when using ImageView <ImageView android:layout_width="50DP" android:layout_height="50DP" Android:scaletype="Matrix" android:src="@drawable/actionbar_bg" /> The properties of the ScaleType are: Matrix fitxy fitstart fitcenter fitend Center Centercrop centerinside
Matrix is drawn with matrices (The matrix region starting from the upper-left corner)
Fitxy the image is not scaled up/down to the view size display (make sure the picture is fully displayed and filled with the view)
Fitstart enlarges/shrinks the image to the width of the view, which is displayed in the upper part of the view (the picture is displayed in full)
Fitcenter enlarge/Shrink the picture to the width of the view, centered (the picture will be displayed in full)
Fitend enlarge/Shrink the image to the width of the view, displayed in the lower part of the view (the picture will be displayed in full)
Center by the original size of the picture is displayed, when the picture is wider than the width of the view, then the center portion of the image is captured, when the picture is less than the width of the view, the picture is centered
Centercrop proportionally enlarges/shrinks the size of the image so that the image is higher than the view, making the picture wider or larger than the view width
Centerinside the contents of the picture to the full center, so that the picture is scaled down or the original size (picture than view hours) so that the picture width is equal to or less than the width of the view (picture will be full display)
From for notes (Wiz)
Android ImageView ScaleType Properties