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!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…