我希望我的列表视图项目被排列并显示为表格数据。我在每个 ListItem 中有四个 TextView。我什至在边缘都有第一个和第四个。我不能让中间排队。有一个更好的方法吗?
<?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="40dp"
android:background="@color/row_selector"
android:paddingLeft="10dp"
android:paddingRight="5dp"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="@+id/labelGas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="25"
android:text="@+id/label"
android:textColor="#222"
>
</TextView>
<TextView
android:id="@+id/labelDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="15"
android:text="@+id/label"
android:textColor="#222"
>
</TextView>
<TextView
android:id="@+id/labelApr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="35"
android:text="@+id/label"
android:textSize="18dp" >
</TextView>
<TextView
android:id="@+id/labelFee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="@+id/label"
>
</TextView>
</LinearLayout>