I am not sure if it works, but this post does not recommend it.
You could just put a LinearLayout with android:orientation="vertical" and android:width="match_parent" or another GridLayout below your GridLayout.
If you don’t have any wrapping layout, wrap both of them into a LinearLayout with android:orientation="vertical" and put all the properties of your original GridLayout there.
2
Answers
I am not sure if it works, but this post does not recommend it.
You could just put a
LinearLayout
withandroid:orientation="vertical"
andandroid:width="match_parent"
or anotherGridLayout
below yourGridLayout
.If you don’t have any wrapping layout, wrap both of them into a
LinearLayout
withandroid:orientation="vertical"
and put all the properties of your originalGridLayout
there.Have a look at SpanSizeLookup.
Something like:
Replace YOUR_CONDITION with some logic fits your requirements to make a cell twice higher.