Android:scaletype Property

Source: Internet
Author: User

imageview.scaletype.center|android:scaletype= "CENTER" Base on the geometric center point of the original image and the geometric center point of the Imagview, The original size of the picture is centered, not scaled, and when the picture is longer/wider than the length/width of the view, the center portion of the captured picture shows the size of the ImageView. When the picture is smaller than the width of the view, only the size of the picture is displayed, not clipped.

imageview.scaletype.center_ Crop|android:scaletype= " centercrop

imageview.scaletype.center_inside|android:scaletype= "centerinside" Based on the geometric center point of the original image and the geometric center point of the Imagview, the content of the picture is completely centered, and the size of the image is scaled to make the picture long (wide) equal to or less than ImageView length (width).


imageview.scaletype.fit_center|android:scaletype= "fitcenter "  expands (shrinks) the image proportionally to the width of the view, centered on the

imageview.scaletype.fit_end|android:scaletype= "fitend "   Expand the picture proportionally (zoom out) to the width of the view, displayed in the lower part of the view

imageview.scaletype.fit_start|android:scaletype= "fitstart "  zoom (zoom in) the picture to the width of the view, displayed in the upper part of the view

imageview.scaletype.fit_xy|android:scaletype= "fitxy" displays the picture in the view at the specified size, stretches the picture, does not maintain the original proportions, fills the view.


imageview.scaletype.matrix|android:scaletype= "matrix" is drawn with matrix

fit-x class, fitstart, Fitcenter, and Fitend, the original changes are adapted to the Imgview as needed, not clipped, drawn by the matrix, but they

(the point in matrix mode where the picture can be centered) , while the base point of the Fitend is the point at the lower right corner (that is, the matrix method is the last draw point).

Center Class , center, Centercrop, and Centerinside are all based on the geometric center point of the original and the geometric center point of the Imagview, and only draw
Imagview size of the image, the difference is whether to maintain the original size of the drawing and the target of different, the means adopted.


Android:scaletype Property

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.