Course 6 of Android-Preliminary Layout of Android 3-multiple layout nested layout

Source: Internet
Author: User

If you read the layout aboveCodeIf it doesn't feel any difficulty for this, I will paste the result graph first. I first read the result and wrote it myself. There are three linearlayout in the nest. This is a bit like Div + CSS... not complicated. Paster.

If you have already written the above Code, do not read the following code. This section is just a summary, and the next section is wonderful.

Main. xml

<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android" <br/> Android: Orientation = "vertical" <br/> Android: layout_width = "fill_parent" <br/> Android: layout_height = "fill_parent" <br/> </P> <p> <linearlayout <br/> Android: orientation = "horizontal" <br/> Android: layout_width = "fill_parent" <br/> Android: layout_height = "fill_parent" <br/> Android: layout_weight = "1"> </P> <p> <textview <br/> Android: text = "red" <br/> Android: gravity = "center_horizontal" <br/> Android: Background = "# aa0000" <br/> Android: layout_width = "wrap_content" <br/> Android: layout_height = "fill_parent" <br/> Android: layout_weight = "1"/> <br/> <textview <br/> Android: TEXT = "green" <br/> Android: gravity = "center_horizontal" <br/> Android: Background = "#00aa00" <br/> Android: layout_width = "wrap_content" <br/> Android: layout_height = "fill_parent" <br/> Android: layout_weight = "1"/> <br/> <textview <br/> Android: text = "blue" <br/> Android: gravity = "center_horizontal" <br/> Android: Background = "# javasaa" <br/> Android: layout_width = "wrap_content" <br/> Android: layout_height = "fill_parent" <br/> Android: layout_weight = "1"/> <br/> <textview <br/> Android: TEXT = "yellow" <br/> Android: gravity = "center_horizontal" <br/> Android: Background = "# aaaa00" <br/> Android: layout_width = "wrap_content" <br/> Android: layout_height = "fill_parent" <br/> Android: layout_weight = "1"/> <br/> </linearlayout> </P> <p> <linearlayout <br/> Android: orientation = "vertical" <br/> Android: layout_width = "fill_parent" <br/> Android: layout_height = "fill_parent" <br/> Android: layout_weight = "1"> </P> <p> <textview <br/> Android: text = "row one" <br/> Android: textsize = "15pt" <br/> Android: layout_width = "fill_parent" <br/> Android: layout_height = "wrap_content" <br/> Android: layout_weight = "1"/> <br/> <textview <br/> Android: text = "row two" <br/> Android: textsize = "15pt" <br/> Android: layout_width = "fill_parent" <br/> Android: layout_height = "wrap_content" <br/> Android: layout_weight = "1"/> <br/> <textview <br/> Android: text = "Row Three" <br/> Android: textsize = "15pt" <br/> Android: layout_width = "fill_parent" <br/> Android: layout_height = "wrap_content" <br/> Android: layout_weight = "1"/> <br/> <textview <br/> Android: text = "row four" <br/> Android: textsize = "15pt" <br/> Android: layout_width = "fill_parent" <br/> Android: layout_height = "wrap_content" <br/> Android: layout_weight = "1"/> <br/> </linearlayout> </P> <p> </linearlayout> <br/>

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.