Table layout and Linear layout

Source: Internet
Author: User

XML: One is parsing of event streams (SAX) and parsing of (DOM) documents.

  

Steps:

(1): Modify in project directory layout file main.xml under Res/layout of new project

(2): Table layout Manager: <tablelayout

Which is the layout of the row: <tablerow

(3): Linear layout Manager: <linearlayout

A linear layout is where the components placed are laid out in a vertical or horizontal direction. In a linear layout, each row (for vertical sorting) or each column (for horizontal sorting)

Only one component can be placed in, and the linear layout in Android does not wrap, and when the edge of the form is reached, the subsequent components are no longer displayed.

Where the arrangement is controlled by the Android:orientation property to control the alignment by the Android:gravity property

Basic format:

<linearlayout xmlns:android= "Http://schemas:android.com/apk/res/android"

Property List

>

</LinearLayout>

Where to add a text component: <textview

Add image text: <imageview

  

(4): Frame layout Manager: <framelayout

(5): Relative layout manager: <relativelayout

(6): Absolute layout Manager: <absolutelayout//This layout is no longer used in 2.0.

Table layout and Linear layout

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.