4

TableLayout contains the handy attribute android:stretchColumns="*" to distribute column width evenly over the size of the table. Can the same be done for rows?

Maarten
  • 6,894
  • 7
  • 55
  • 90

1 Answers1

4

TableLayout extends LinearLayout, so you can just define your TableRows as such:

<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="0"
     android:layout_weight="1"/>
Maarten
  • 6,894
  • 7
  • 55
  • 90