The relationship and difference between android:layout_height, Android:layout_width, Android:height and Android:width

Source: Internet
Author: User

has been to Android:layout_height, Android:layout_width, Android:height, android:width These properties of the relationship some do not understand, since there is android:layout_ Why do height and android:layout_width have android:height, android:width? Search on the internet for a long time to find are repeating a word of nonsense, this afternoon to take a good study of the next found only Android:layout_height and android:layout_width value is wrap_content when the corresponding Android: Height, android:width function, namely:Android:layout_height and Android:layout_width value is wrap_content, the final size of the control is by Android: Height, android:width, and the minimum height android:minheight and minimum width of the control are determined by the maximum value android:minwidth both . Assuming that Android:height is 20px and the minimum height of the control is Android:minheight 30px, the height of the control is 30px when Android:layout_height is wrap_content.

When the values of Android:layout_height and android:layout_width are match_parent or specific values (such as 50DP, 60px, 30SP, etc.),android:height, Android:width is not working.

The relationship and difference between android:layout_height, Android:layout_width, Android:height and Android:width

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.