Differences between Android fill_parent and match_parent

Source: Internet
Author: User

The two parameters have the same meaning.

 

What type is match_parent?   In fact, from Android 2.2, fill_parent is renamed as match_parent. The API level is 8.In the beginning, we can directly use match_parent to replace fill_parent. In essence, their definitions are the same as-1, but they only change their aliases, which may be more accurate, For example, the final definition in the SDK is:     In the static nesting class layoutparams in Android. View. viewgroupCode: 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 ).
Related Article

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.