Android: Introduction to attributes of relativelayout Layout

Source: Internet
Author: User

======================================

Relativelayout

---- Watch a video from instructor Mars and learn

======================================

Android: layout_above ----- above the control with the specified ID at the bottom of the control
Android: layout_below ----- the top of the control.
Android: layout_toleftof --- the right edge of the Control. the left edge of the control with the given ID is aligned.
Android: layout_torightof ---- the left edge of the Control. the right edge of the control with the given ID is aligned.
====================================
Android: layout_alignbaseline ---- the baseline of the control is aligned with the baseline of the control with the given ID
Android: layout_alignbottom ----- the bottom edge of the control and the bottom edge of the given ID Control
Android: layout_alignleft ------ the left edge of the control is aligned with the left edge of the given ID
Android: layout_alignright ----- the right edge of the control is aligned with the right edge of the given ID
Android: layout_aligntop ------ the top edge of the control is aligned with the top edge of the given ID
========================================================== ========
Android: alignparentbottom ----- if the value is true, the bottom of the control is aligned with the bottom of the parent control.
Android: layout_alignparentleft ---- if it is true, the left side of the control is aligned with the left side of the parent control.
Android: layout_alignparentright --------- if it is true, the right side of the control is aligned with the right side of the parent Control
Android: layout_alignparenttop ------ if it is true, the top of the control is aligned with the top of the parent control.

Android: layout_centerhorizontal ----- if it is true, the control is centered horizontally.
Android: layout_centerparent ---- if it is set to true, the control is directed to the horizontal and vertical directions of the parent control.
Android: layout_centervertical ---- if it is true, the space is centered in the vertical direction.

 

When watching the video from the instructor Mars, the results are displayed.

Edittext is under textview

The OK button is under edittext, and its right edge is the same as the right edge of the parent control, with a 10dp distance from the control on its left.

The cancel button is on the left of the OK button, under edittext, and aligned with the OK button on the top

 

 

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.