In my experience I had both GridLayout
and TableLayout
give me the same results. They both seem to stretch the columns to fit the widest child element. Neither will give you gird lines or borders around the cells.
From the official docs on GridLayout
:
Row and Column Specs
Children occupy one or more contiguous cells, as defined by their rowSpec and columnSpec layout parameters. Each spec defines the set of rows or columns that are to be occupied; and how children should be aligned within the resulting group of cells. Although cells do not normally overlap in a GridLayout, GridLayout does not prevent children being defined to occupy the same cell or group of cells. In this case however, there is no guarantee that children will not themselves overlap after the layout operation completes.
and from the TableLayout
:
The table has as many columns as the row with the most cells. A table can leave cells empty. Cells can span columns, as they can in HTML.
So it seems to me that the GridLayout
is a bit more versatile and probably what you are looking for.