.net

.net

博客园 首页 新随笔 联系 订阅 管理

android listView布局4等分列。

必须要加上<RelativeLayout 在外层,不然等分不起作用

 

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:paddingBottom="4dip"
    android:layout_width="fill_parent"
    android:background="@drawable/mm_listitem">

<LinearLayout
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 
 android:orientation="horizontal">  
   
 <TextView
  android:id="@+id/tvBornDate"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_weight="1"
  android:padding="2dp"
  android:textColor="#000000"
  android:text="日期"
  android:textSize="16sp"/>

    <TextView
        android:id="@+id/tvQtySum"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:padding="2dp"
        android:textColor="#000000"
        android:text="日期"
        android:textSize="16sp"/>
    <TextView
        android:id="@+id/tvAmtSum"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:padding="2dp"
        android:textColor="#000000"
        android:text="日期"
        android:textSize="16sp"/>

    <TextView
        android:id="@+id/tvCoStatus"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:padding="2dp"
        android:textColor="#000000"
        android:text="日期"
        android:textSize="16sp"/>
</LinearLayout>
</RelativeLayout>

posted on 2014-03-28 15:06  航宇  阅读(1838)  评论(0编辑  收藏  举报