Android:scaletype= How to display the "Matrix" layout file when loading pictures

Source: Internet
Author: User

Android:scaletype= "Center"

Based 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.

Android:scaletype= "Centercrop"

Based on the geometric center point of the original image and the geometric center point of the Imagview, the size of the picture is displayed proportionally (the picture is less than the width of the view), making the picture long (wide) equal to or greater than the view's length (width), and the image is truncated by the size of the view. When the size of the original image is greater than imageview, proportionally reduce the picture, so that the length of the width of the imageview has always been equal to the other has always been greater than ImageView. In fact, the size of the original image is greater than or equal to ImageView's length (width).

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 long (wide).

Android:scaletype= "Fitcenter" expands the picture proportionally (shrinks) to the width of the view, centered

Android:scaletype= "Fitend" expands the picture proportionally (shrinks) to the width of the view, displayed in the lower part of the view

Android:scaletype= "Fitstart" expands the picture proportionally (shrinks) to the width of the view, displayed in the upper part of the view

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.

Android:scaletype= "Matrix" is drawn with the matrix (default).

Android:scaletype= How to display the "Matrix" layout file when loading pictures

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.