Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72388

Set rowSpan or colSpan of a child of a GridLayout programmatically?

$
0
0

I have a GridLayout with 5 columns and 3 rows. Now I can insert arbitrary child views, which is great. Even better is, that I can assign columnSpan=2 to some item in order to span it to 2 columns (the same with rowSpan).

The problem now is, that I cannot assign rowSpan or columnSpan programmatically (i.e. at runtime). Some search suggested something like this:

layoutParams.columnSpec = GridLayout.spec(0, columnSpan);

But I don't quite understand what the parameters of spec mean (start and size). The documentation is also quite poor at this point.

Any help is highly appreciated!


Viewing all articles
Browse latest Browse all 72388

Trending Articles