Five la s for Android and five la s for android

Source: Internet
Author: User

Five la s for Android and five la s for android

 Five la s of Android: FrameLayout (Framework layout), LinearLayout (linear layout), AbsoluteLayout (absolute layout), RelativeLayout (relative layout), and TableLayout (table layout ).

FrameLayout

All things are placed in the upper left corner in sequence, which will overlap. This layout is relatively simple, and you can only put a little simple things.

LinearLayout

Each LinearLayout can be divided into vertical layout (android: orientation = "vertical") and horizontal layout (android: orientation = "horizontal "). In vertical layout, each row has only one element, and multiple elements are vertical down in sequence. in horizontal layout, there is only one row, and each element is arranged to the right in sequence.

AbsoluteLayout

The absolute layout uses the X and Y coordinates to specify the position of the element. This layout method is also relatively simple, but when the screen is rotated, there are often problems, and when there are multiple elements, computing is troublesome.

RelativeLayout

The relative layout can be understood as the layout method for positioning an element as a reference object. Main attributes include: android: layout_below, android: layout_toLeftOf, android: layout_alignParentLeft, android: layout_alignParentRigh

TableLayout

Each TableLayout contains the table row TableRow, which can define each element.

Each layout has its own method. These five layout elements can be nested with each other to create a beautiful interface.

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.