在TableLayout的高度上均匀分布行

时间:2014-02-06 13:25:48

标签: android android-tablelayout

TableLayout包含方便的属性android:stretchColumns="*",可以在表格大小上均匀分配列宽。可以为行做同样的事吗?

1 个答案:

答案 0 :(得分:1)

TableLayout扩展了LinearLayout,因此您只需定义TableRows即可:

<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="0"
     android:layout_weight="1"/>
相关问题