i

    Ink

    1 year ago
    Hi How can I do list like below in compose? Should I use
    LazyVerticalGrid
    ?
    cb

    cb

    1 year ago
    t

    Tin Tran

    1 year ago
    How do I make each row have a padding to the row underneath like the sample, Chirst?
    i

    Ink

    1 year ago
    @Tin Tran good question
    @Tin Tran
    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

    Tin Tran

    1 year ago
    Thanks!