Android Knowledge Point Review Two

Source: Internet
Author: User
<span id="Label3"></p><p><p>Android&&scaletype android:scaletype= "centercrop" This property puts the picture to the maximum</p></p><p><p>Imageview.setscaletype (ImageView.ScaleType.CENTER_CROP);</p></p><p><p></p></p><p><p>Imageview.scaletype total of eight kinds:</p></p><p><p>1 · ImageView.ScaleType.center: the picture is in the middle of the view, but does not perform zooming.</p></p><p><p>2 · ImageView.ScaleType.CENTER_CROP scale a picture by a uniform scale (keeping the size of the picture Proportional) so that the two dimensions (width and height) of the picture are equal to or greater than the dimensions of the corresponding view</p></p><p><p>3 · ImageView.ScaleType.CENTER_INSIDE scale a picture by a uniform scale (keeping the size of the picture Proportional) makes it easy for the two dimensions (width and height) of the picture to be equal to or less than the dimensions of the corresponding view</p></p><p><p>4 · ImageView.ScaleType.FIT_CENTER Zooming pictures using center</p></p><p><p>5 · ImageView.ScaleType.FIT_END zooming a picture using end</p></p><p><p>6 · ImageView.ScaleType.FIT_START Zoom picture using start</p></p><p><p>7 · ImageView.ScaleType.FIT_XY zooming a picture using XY</p></p><p><p>8 · ImageView.ScaleType.MATRIX scaling with picture matrix when drawing</p></p><p><p></p></p><p><p>Public methods</p></p><p><p>Static Imageview.scaletype valueOf (String Name)</p></p><p><p></p></p><p><p>Final static scaletype[] values ()</p></p><p><p></p></p><p><p>Enumeration values</p></p><p><p>public static final Imageview.scaletype CENTER</p></p><p><p>The picture is in the middle of the view, but does not scale. In xml, use syntax: android:scaletype= "center"</p></p><p><p>public static final Imageview.scaletype Center_crop</p></p><p><p>Scale the picture proportionally (keeping the size of the picture Proportional) so that the two dimensions (width and height) of the picture are equal to or greater than the corresponding view Dimension. The picture is then centered on the VIEW. In xml, use syntax: android:scaletype= "centercrop"</p></p><p><p>public static final Imageview.scaletype Center_inside</p></p><p><p>Scale the picture proportionally (keeping the size of the picture Proportional) so that the two dimensions (width and height) of the picture are equal to or less than the corresponding view Dimension. The picture is then centered on the VIEW. In xml, use syntax: android:scaletype= "centerinside"</p></p><p><p>public static final Imageview.scaletype Fit_center</p></p><p><p>Zoom the picture using Center. In xml, use syntax: android:scaletype= "fitcenter"</p></p><p><p>public static final Imageview.scaletype Fit_end</p></p><p><p>Zoom the picture using End. In xml, use syntax: android:scaletype= "fitend"</p></p><p><p>public static final Imageview.scaletype Fit_start</p></p><p><p>Zoom the picture using Start. In xml, use syntax: android:scaletype= "fitstart"</p></p><p><p>public static final Imageview.scaletype Fit_xy</p></p><p><p>Zoom the picture using Fill: In xml, use syntax: android:scaletype= "fitxy"</p></p><p><p>public static final Imageview.scaletype MATRIX</p></p><p><p>Use the picture matrix to scale when drawing. The picture matrix can be set using the Setimagematrix (matrix). In xml, use syntax: android:scaletype= "matrix"</p></p><p><p></p></p><p><p>In core java, the thread class is real, but the task does not, but the concept is often used and is often mixed with Thread.</p></p><p><p>so, here, Let's talk about some of my understanding of the Two.</p></p><p><p>I think:</p></p><p><p>1, task is the business logic, for this business logic we can be defined in the run () method in a runable instance, or call () in the callable Instance.</p></p><p><p>(as for the difference between them, you can refer to another blog post I reprinted: callable and Runnable)</p></p><p><p>2, thread can be understood as the actual work of the unit, can be Reused. This is in the core Java Api.</p></p><p><p>finally, allow me to make an inappropriate analogy:</p></p><p><p>I wonder if you have ever been to a custom-made furniture? If there is, it should be easier to understand my idea:</p></p><p><p>Thread is a furniture craftsman and task is a custom design drawing for the Guest.</p></p><p><p>Android Knowledge Point Review Two</p></p></span>

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.