Relativelayout layout (valid only in relativelayout)

Source: Internet
Author: User

Android: layout_alignparentleft = "true" in the relative position of the parent layout // on the left of the layout

Android: layout_alignparentright = "true" // on the right of the Layout

Android: layout_alignparenttop = "true" // above the Layout

Android: layout_alignparentbottom = "true" // under the Layout

 

Relative Position of a widget

Android: layout_torightof = "@ ID/button1" // on the right side of the control button1, not just close

Android: layout_toleftof = "@ ID/button1" // on the left side of the control button2, not just close

Android: layout_below = "@ ID/button1" // under the control button1, not just at the bottom

Android: layout_above = "@ ID/button1" // on the control button1, not just the upper side

 

Definition and a widget

Android: layout_aligntop = "@ ID/button1" // aligntop = "@ ID/button1"

Android: layout_alignbottom = "@ ID/button1" // align with the lower part of the control button1

Android: layout_alignleft = "@ ID/button1" // align left with the control button1

Android: layout_alignright = "@ ID/button1" // right-aligned with the control button2

 

Android: layout_centerhorizontal = "true" // horizontally centered
Android: layout_centervertical = "true"
Android: layout_centerinparent = "true"

Relativelayout layout (valid only in relativelayout)

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.