How to stretch vertically one row in TableLayout?

I want to stretch vertically one row in a TableLayout.

For instance:

Layout table has four rows (height and width match_parent)

ROW-1, ROW-2, ROW-4 have the same height.

ROW-3 - stretches vertically

+4
source share
2 answers

Make sure TableLayout is set to layout_height for match_parent and enter line 3 a layout_weight="1.0" .

+13
source

vertically - column. If you have a row with two columns at the top and next to it, then this row will also contain 2 columns. This is probably why 4 is not stretched vertically due to the lines above. you need to do the following: android:stretchColumns ="*" This will stretch the column, which requires row 4 to be free of lines above it. See if it gives the right results.

-2
source

All Articles