Android Summary of the ImageView ScaleType properties

Source: Internet
Author: User

ImageView's ScaleType in Android has 8 selectable options

1 matrix does not scale the picture, the original image from the upper left corner of the view to draw pictures (picture does not distort);

2 Fitxy the picture into the view, but the picture will be distorted; (picture distorted, full view)

3 Fitstart, Fitcenter, fitend three properties Select the long edge of the picture to scale the image, and because of this, the picture is not fully filled with the view, except that the image is drawn in the view with different anchor points; cannot be filled with view)

4 Center does not scale the image processing, select the view and the center of the image to draw; (picture does not distort)

5 Centercrop will ensure that the image is full of view, so the shorter edge of the image will be selected as the benchmark for scaling; (picture is not distorted, full view)

6 centerinside Ensure that the picture is displayed in the middle of the view, when the picture is larger than the view, it will select the long edge of the picture to reduce the image, when the image width is higher than the view, the picture is displayed directly in the middle of the view. (Picture not deformed)

Android Summary of the ImageView ScaleType properties

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.