Question

I guess I just havent found a good explanation here. So can anyone please tell me what android:stretchColumns actually does? I have it in my table and have tried several different values but cannot seem to figure out what it is doing.

Sorry for the dumb question!

Was it helpful?

Solution

A TableLayout can specify certain columns as shrinkable or stretchable

by calling setColumnShrinkable() or setColumnStretchable(). If marked as shrinkable, the column width can be shrunk to fit the table into its parent object. If marked as stretchable, it can expand in width to fit any extra space. The total width of the table is defined by its parent container.

Have a look here, keep in mind that if your table fits nicely ( no space left to stretch) in the parent object, you would not see any changes no matter what value you put in.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top