What type of layout is match_parent?

Source: Internet
Author: User

Some netizens said they do not understand the appearance of match_parent in layout. In the past, only fill_parent and wrap_content were used. What type of match_parent is actually? In fact, from Android 2.2, fill_parent was renamed as match_parent. From API Level 8, we can directly use match_parent to replace fill_parent. Finally, android123 reminds everyone that their definitions are essentially the same as-1, I just changed an alias. It may be more accurate. For example, the final definition in the SDK is:

Fill_parent-1 The View shoshould be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent.
Match_parent-1 The View shoshould be as big as its parent (minus padding). Introduced in API Level 8.
Wrap_content-2 The View shoshould be only big enough to enclose its content (plus padding ).

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.