This message was deleted.
# compose
s
This message was deleted.
a
As per the guidelines, put more than four lines of text in the thread. Thanks
s
@adjpd sorry I just corrected it. This would be the expected result
a
You need to flatten the collection and implement grid layout yourself. Something like:
Copy code
LazyColumn() {
    collection.forEach { item ->
        item {
            Text(text = item.title)
        }
        // Assuming 3 items per row
        items(item.products.size / 3) { i ->
            Row {
                for (j in 0 until 3) {
                    Button_Square_Selection1(item.products[i * 3 + j], modifier = Modifier.weight(1f))
                }
            }
        }
    }
}
👍 2
s
@Albert Chang thank you! besides, you have given me new ideas
👍 1