`

android_14 线性布局2

 
阅读更多

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <LinearLayout 
        android:layout_width="fill_parent"
    	android:layout_height="wrap_content" 
    	android:orientation="horizontal"
    	android:layout_weight="1">

       	<TextView
       	    android:layout_width="wrap_content"
       	    android:layout_height="match_parent"
       	    android:layout_weight="1"
       	    android:background="#ff00ff"
       	    android:text="aaaaaa" />

       	<TextView 
       	    android:layout_width="wrap_content"
       	    android:layout_height="match_parent"
       	    android:layout_weight="1"
       	    android:text="bbbbb"
       	    android:background="#ffff00"
       	    />
       	<TextView 
       	    android:layout_width="wrap_content"
       	    android:layout_height="match_parent"
       	    android:layout_weight="1"
       	    android:text="cccccccc"
       	    android:background="#00ff00"
       	    />
       	<TextView 
       	    android:layout_width="wrap_content"
       	    android:layout_height="match_parent"
       	    android:layout_weight="1"
       	    android:text="ddddddd"
       	    android:background="#0000ff"
       	    />
    </LinearLayout>
    
    <LinearLayout 
        android:layout_width="fill_parent"
    	android:layout_height="fill_content"
    	android:orientation="vertical"
    	android:layout_weight="1">
       	
        <TextView 
       	    android:layout_width="wrap_content"
       	    android:layout_height="wrap_content"
       	    android:text="第一行"
       	    android:layout_weight="1"
       	    />
        <TextView 
       	    android:layout_width="fill_parent"
       	    android:layout_height="wrap_content"
       	    android:text="第二行"
       	    android:layout_weight="1"
       	    />
        <TextView 
       	    android:layout_width="fill_parent"
       	    android:layout_height="wrap_content"
       	    android:text="第三行"
       	    android:layout_weight="1"
       	    />
        <TextView 
       	    android:layout_width="wrap_content"
       	    android:layout_height="wrap_content"
       	    android:text="第四行"
       	    android:layout_weight="1"
       	    />
        
        
        
    </LinearLayout>
   

</LinearLayout>
 


 

 

  • 大小: 7.5 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics