Hi How can I do list like below in compose? Should...
# compose
i
Hi How can I do list like below in compose? Should I use
LazyVerticalGrid
?
1
c
Yep
❤️ 1
t
How do I make each row have a padding to the row underneath like the sample, Chirst?
👍 1
i
@Tin Tran good question
@Tin Tran
Copy code
LazyVerticalGrid(
    cells = GridCells.Fixed(2),
    modifier = Modifier
        .background(Color(0xFFFAD6A5))
        .padding(50.dp)
        .wrapContentHeight()
        .fillMaxWidth(),
    contentPadding = PaddingValues(
        start = 12.dp,
        top = 16.dp,
        end = 12.dp,
        bottom = 16.dp
    ),
    content = {
       items(productCategoryList){ it ->
           Box(Modifier.padding(20.dp)) {
               ProductCategoryItemView(it)
           }
       }
    }
)
Add
Box()
with padding to your @Composable item
t
Thanks!