Common Layout in Android and common layout in Android

Source: Internet
Author: User

Common Layout in Android and common layout in Android

1. Linear layout LinearLayout
Orientation: vertical, vertical, horizontal, horizontal
Gravity: Alignment mode. The alignment mode between the child control and the current control.
Layout_gravity: Alignment of the current control relative to the parent Control
Margin: the spacing between the current control and the surrounding area.
Padding: the padding between the child control in the current control and the surrounding area of the current control.

2. RelativeLayout is relative layout starting from the upper left corner. To control the position, you must set the position of each control relative to other controls.
Layout_below: under which the control is located
Layout_above: the control on which it is located
Layout_toLeftOf: Specifies the control on the left.
Layout_toRightOf: specifies the right of the control to which the current control is located
Layout_alignParentRight: the method of the current control based on the parent form
Layout_centerHorizontal: horizontally centered
Layout_centerVertical: vertical center
Layout_centerInParent: located in the middle of the parent form

 
3. FrameLayout

The child controls in the frame layout are stacked layer by layer up.

4. TableLayouts
One TableRow in TableLayout represents a row, and one control in TableRow represents a column.
5. Absolute layout (abandoned) AbsoluteLayou

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.