File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 33The ` content ` composable lambda of grid layout extends ` BoxGridScope ` .
44In the ` BoxGridScope ` , you can use ` rowSpan ` and ` columnSpan ` modifier to set span size of cell.
55
6- The ` rowSpan ` and ` columnSpan ` modifiers take a lambda to calculate span .
7- The lambda returns an integer value, the span size.
6+ The ` span ` modifiers take a lambda to calculate spans .
7+ The lambda returns a ` BoxGridItemSpan ` which represents row and column span size.
88Or you can just pass ` null ` instead of lambda to use default span size, which is 1.
99
1010``` kotlin
1111BoxGrid (
1212 rows = SimpleGridCells .Fixed (3 ),
1313 columns = SimpleGridCells .Fixed (3 )
1414) {
15- Item (modifier = Modifier .rowSpan { 2 })
15+ Item (modifier = Modifier .span { BoxGridItemSpan (rowSpan = 2 , columnSpan = 1 ) })
1616 Item (modifier = Modifier .column(2 ))
17- Item (modifier = Modifier .row(1 ).column(1 ).columnSpan { 2 })
18- Item (modifier = Modifier .row(2 ).columnSpan { 2 })
17+ Item (modifier = Modifier .row(1 ).column(1 ).span { BoxGridItemSpan (rowSpan = 1 , columnSpan = 2 ) })
18+ Item (modifier = Modifier .row(2 )span { BoxGridItemSpan (rowSpan = 1 , columnSpan = 2 ) })
1919}
2020```
2121
You can’t perform that action at this time.
0 commit comments