Is LazyGrid compatible at all with fixed width chi...
# compose
v
Is LazyGrid compatible at all with fixed width children? This seems to stretch the items even with the horizontal arrangement 🤔
Copy code
LazyVerticalGrid(
        columns = GridCells.Fixed(4),
        horizontalArrangement = Arrangement.SpaceBetween,
        verticalArrangement = Arrangement.spacedBy(Spacing.SPACE_12)
    ) { items(20) { idx -> Box(Modifier.size(50.dp).background(Color.Red)) }}
s
The spacing only applies between columns, the item content is stretched to full width You can wrap content with another transparent box and align your fixed size items inside it
o
I think you can implement GridCells yourself and make it fixed width
v
This makes sense, thanks for the explanation!