shock 11
10/02/2024, 10:33 AMshock 11
10/02/2024, 10:34 AMshock 11
10/02/2024, 10:44 AMHristijan
10/02/2024, 12:00 PMshock 11
10/02/2024, 12:05 PMshock 11
10/02/2024, 12:06 PMshock 11
10/02/2024, 5:12 PMspan { GridItemSpan() }
that the items and itemsIndexed provides for us. For my usecase, I wanted the items to be placed in a 2 by 1 span which gets looped just like in the image above, so I used the itemsIndexed with its span parameter like this.
span = { index, _ ->
val spanCount = if (index % 3 == 2) 2 else 1
GridItemSpan(spanCount)
}
shock 11
10/02/2024, 5:14 PM