Android daily Knowledge Collection and summary of the Relativelayout chapter

Source: Internet
Author: User

Relativelayout is a very common layout in Android, today there is more understanding of the layout, the following records relativelayout some common properties


android:layout_above the control to the bottom of the control for the given ID, but not left-aligned, by default to the leftmost side of the parent window, overwriting the leftmost control  

android:alignparentbottom if the value is true, aligns the bottom of the control with the bottom of the parent control, which is placed by default at the leftmost left of the parent window, overwriting the leftmost control  
android:layout_alignparentleft if the value is true, align the left side of the control with the left side of the parent control, which is placed by default on the leftmost top of the parent window. Overrides the leftmost control  
android:layout_alignparentright if the value is true, the right side of the control is aligned to the right of the parent control, The default is placed at the top right of the parent window, overwriting the top right control  
android:layout_alignparenttop if the value is true, Aligns the top of the control to the top of the parent control, and defaults to the leftmost upper-left side of the parent window, overwriting the leftmost control

Android:layout_alignbaseline the control's baseline and the baseline of the given ID are aligned and placed on the leftmost side of the parent window, overwriting the leftmost control
Android:layout_alignbottom aligns the bottom edge of the control with the bottom edge of the given ID control and places the leftmost control on the leftmost side of the parent window
Android:layout_alignleft aligns the left edge of the control with the left edge of the given ID control, and places the topmost control on top of the parent window
Android:layout_alignright aligns the right edge of the control with the right edge of the given ID control, and places the topmost control on top of the parent window
Android:layout_aligntop aligns the top edge of the given control with the top of the given ID control and places the leftmost control on the leftmost side of the parent window


Android daily Knowledge Collection and summary of the Relativelayout chapter

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.