Android development layout case one

Weight: the proportion of the layout interface

Practice case:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    >
  <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="#f47920">
  </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="#2a5caa">
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="#faa755">
    </LinearLayout>
</LinearLayout>

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/weixin_44893902/article/details/108682818