The scaletype of the picture ImageView the properties of Android:scaletype,

Source: Internet
Author: User

1 Imageview.setscaletype (ImageView.ScaleType.FIT_XY);

1  Here we focus on understanding ImageView's attribute Android:scaletype, namely Imageview.setscaletype (Imageview.scaletype). Android:scaletype is a size that controls how the picture resized/moved to the ImageView. The meaning difference of Imageview.scaletype/android:scaletype value:
2
3 Center/center by the original size of the picture, when the picture is longer/wider than the length/width of the view, then the center portion of the image is displayed
4
5 Center_crop/centercrop Proportionally enlarges the size of the image so that the image is long (wide) equal to or greater than the length (width) of the view
6
7 Center_inside/centerinside Display the contents of the picture in full, by scaling it down or the original size to make the picture long/wide equal to or less than the length/width of the view
8
9 fit_center/fitcenter Enlarge/Shrink the picture to the width of the view, centered on the display
10
Fit_end/fitend to zoom in/out of the image to the width of the view, shown in the lower part of the view
12
Fit_start/fitstart Enlarge/Shrink the image to the width of the view, displayed in the upper part of the view
14
Fit_xy/fitxy The picture is not scaled up/down to the view size display
16
Matrix/matrix using matrices to draw


At first I did not understand matrix matrices, the web search found that the original matrix can be scaled to zoom the image to display, here do not expand in-depth understanding, just post related statements, reduce the image:




4





10





3 android:layout_width= "Fill_parent"
4
5
6

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.