Andrew Prock
Andrew Prock

Reputation: 7117

TableLayout row strech/shrink

I'm trying to fit a 20x20 table into a view using a programmatically built TableLayout. The setStretchAllColumns/setShrinkAllColumns methods work perfectly for squeezing all the columns in, but I haven't found a way to get all the rows in.

Is there a corresponding method for packing the rows in?

Upvotes: 2

Views: 2549

Answers (1)

user
user

Reputation: 87064

There aren't any setStretchAllColumns/setShrinkAllColumns for rows in a TableLayout. One thing that you could try(I haven't tested it) is to give your TableLayout a weigtSum of 20(with the method setWeightSum()) and then set the weight(the layout_weight attribute from a xml layout) of 1 for each of your 20 TableRows in the TableLayout.

Upvotes: 1

Related Questions