Android Summary 25 Large layouts

Source: Internet
Author: User

One or five large layouts

1. LinearLayout Linear layout

2, Relativelayout relative layout

3, Absolutelayout Absolute layout

4. tablelayout Table layout

5. Framelayout Frame Layout

Second, LinearLayout linear layout

1, android:orientation= "horizontal" to make the arrangement of linear layout: horizontal horizontal, Vertical vertical

2, gravity control the current control content display area

Layout_gravity the position of the current control in the parent element

3, Layout_weightsum

Layout_weight Extra Space Allocation (weight)

4, android:visibility= "Invisible" control layout is displayed

1) Show visible

2) does not display, but occupies space invisible

3) Hide Gone

Iii. Relative layout of relativelayout

1. Android:layout_torightof on the right side of the specified control

2. Android:layout_above the top of the specified control

3. Android:layout_alignbaseline horizontal alignment with the specified control

4. Android:layout_alignleft left-aligned with the specified control

5. is android:layout_alignparentleft left-aligned with the parent layout?

6. Android:layout_centervertical is centered vertically in the parent layout

7. Android:layout_centerinparent is centered in the parent layout

Iv. Absolute layout of absolutelayout

1. android:layout_x Specifies the x-axis coordinates of the control in the parent layout

2. android:layout_y Specifies the y-axis coordinates of the control in the parent layout

V. Framelayout Frame Layout

Frame layouts Each added control is displayed at the top, and the last one displayed on the interface is the last control added

Vi. tablelayout Table layout

1, android:shrinkcolumns contraction column

2. Android:stretchcolumns stretched Column

3. Android:collapsecolumns Hidden Column

4. Android:layout_column specified column (on the body of the column)

5. Android:layout_span merge Columns (on the body of the column)

The cell in the

TableRow cell row has no effect when the width is less than the default width, which defaults to fill_parent and the height can be custom size

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.