可能重复:
XML Table layout? Two EQUAL-width rows filled with equally width buttons?Android中设置表布局列的宽度相等
我使用TableLayout
以显示4列数据的列表。
问题描述:
我无法将所有4列,这是我TableLayout
的宽度相等。 我把我的布局代码,我使用...
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="0">
<TableRow>
<TextView android:text="table header1" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
<TextView android:text="table header2" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
<TextView android:text="table header3" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
<TextView android:text="table header4" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
</TableRow>
</TableLayout>
我应该如何改写这个布局,以显示与大小相等4列?
http://stackoverflow.com/q/2865497/778427 –
@Glendon Trullinger waoooo其工作。谢谢。 –