The layout of the Wrap line

Source: Internet
Author: User

A useful custom wrap layout, it is important to note that in the Onmeasure method, the difference between the pattern at_most and the exactly is used when calculating the height of the child control. If the following two images:

1 figure

Is At_most, the black box is the screen, the green box specifies the size of the control, such as (200,100), but the red box is the size you see on the screen, which is the actual size of the control. To put it bluntly, at_most is as long as the content of their own display can be, regardless of the size of the outside designation.

2 figure


The 2 graph represents the exactly, and you can see that the red and green boxes overlap, which means how much is displayed outside the specified number. Specifies that the contents of the control will not be complete, indicating that the display is normal, if there is a background color, on the screen, the display area is overlapping area.

The layout of the Wrap line

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.