[Android] A combination of linear layout and layout

Source: Internet
Author: User

When the app interface is top-down, from left to right,orientation toward,vertical vertical direction, Horizontal Horizontal direction, horizontal direction if there is not enough space, the control will be squeezed out of the screen

The split line between controls is actually a View object <view/>, set height 1dip, Background Black

The Android4.0 developer option has a display layout boundary that shows the boundaries of the layout

Test code:

<?XML version= "1.0" encoding= "Utf-8"?><LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"android:orientation= "vertical" ><TextViewAndroid:layout_width= "Match_parent"Android:layout_height= "Wrap_content"Android:textcolor= "#fff"Android:background= "#88000000"Android:text= "I am a feature 2"/><RelativelayoutAndroid:layout_width= "Match_parent"Android:layout_height= "80DP">    <TextViewAndroid:id= "@+id/tv_title"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:textsize= "25SP"Android:textcolor= "#000000"Android:layout_marginleft= "10DP"Android:layout_margintop= "10DP"Android:text= "I am the big text" />    <TextViewAndroid:layout_below= "@id/tv_title"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:textsize= "20SP"Android:textcolor= "#66000000"Android:layout_marginleft= "10DP"Android:layout_marginright= "10DP"Android:text= "I am small text" />    <CheckBoxAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:layout_centervertical= "true"Android:layout_alignparentright= "true"        /></Relativelayout><ViewAndroid:layout_width= "Match_parent"Android:layout_height= "1DP"Android:background= "#ccc"    /><RelativelayoutAndroid:layout_width= "Match_parent"Android:layout_height= "80DP">    <TextViewAndroid:id= "@+id/tv_title1"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:textsize= "25SP"Android:textcolor= "#000000"Android:layout_marginleft= "10DP"Android:layout_margintop= "10DP"Android:text= "I am the big text" />    <TextViewAndroid:layout_below= "@id/tv_title1"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:textsize= "20SP"Android:textcolor= "#66000000"Android:layout_marginleft= "10DP"Android:layout_marginright= "10DP"Android:text= "I am small text" />    <CheckBoxAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:layout_centervertical= "true"Android:layout_alignparentright= "true"        /></Relativelayout></LinearLayout>

[Android] A combination of linear layout and 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.