Distribute rows evenly over the height of a TableLayout

android, android-tablelayout

Solution

`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"/>

Problem

`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?

Original source