Android:scaletype Property

Source: Internet
Author: User

Imageview.scaletype.xxx|android:scaletype= "XXX"

1. Center, "Center"

Center display. does not scale. Not cut.

2. Center_crop, "Centercrop"

When the picture width (height) is less than the width (height) of the ImageView, enlarge the picture proportionally so that the picture is wider (high) than or equal to the width of the ImageView (high). Center display.

3. Center_inside, "Centerinside"

When the width (height) of the picture is greater than the width (height) of the ImageView, the picture is scaled down so that the width (height) of the picture is less than or equal to the width of the ImageView (high). Center display.

4. Fit_center, "Fitcenter"

When the width (height) of the picture is not equal to the width (height) of the ImageView, it is scaled so that the width of the picture is equal to the width of the ImageView, which is centered.

5. Fit_end, "Fitend"

When the width (height) of the picture is not equal to the width (height) of the ImageView, proportionally scales so that the width of the picture is equal to the width of the ImageView, which is displayed at the bottom of the ImageView (right).

6. Fit_start, "Fitstart"

When the width (height) of the picture is not equal to the width (height) of the ImageView, it is scaled so that the width of the picture is equal to the width of the ImageView (high) and appears on top of the ImageView (left).

7. Fit_xy, "Fitxy"

The picture is displayed in the view according to the specified size, and the picture is stretched to show the image, without maintaining the original proportions and filling the view.

8. Matrix, "Matrix"

Use the matrix to draw.

Excerpt: http://www.cnblogs.com/fengzhblog/archive/2012/11/03/2752924.html

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.