How can I set the android:layout_column="1"
programatically? I've seen some other answers but all of them are something that doesn't really work with my code. All of them say to do something like this:
layout.setLayoutParams(new TableRow.LayoutParams(columnNum))
which isn't really what I want, because I have a GridLayout and I already have a set LayoutParams.
My LayoutParams go like this:
GridLayout.LayoutParams middleLayoutLayoutParams = (GridLayout.LayoutParams)middleLayout.getLayoutParams();
middleLayoutLayoutParams.columnSpec = col2;
middleLayout.setLayoutParams(middleLayoutLayoutParams);
numBoxes++;
But I want something like:
middleLayout.column = GridLayout.spec(1)
?
Any way to achieve this?