https://kotlinlang.org logo
#compose
Title
# compose
a

AmrJyniat

08/18/2022, 11:59 AM
I'm using
LazyVerticalGrid
with fixed columns, which makes the width of the items controlled based on column count, but I want to set the item width from itself and the rest space be blank. code in 🧵
c

curioustechizen

08/18/2022, 12:33 PM
I had a roughly similar requirement; in my case all the grid items were supposed to be square. I implemented this constraint in my
GridItem
instead (
Modifier.sizeIn(minWidth=56.dp).aspectRatio(1f)
)
a

Albert Chang

08/18/2022, 2:08 PM
Use
Modifier.wrapContentWidth().size(56.dp)
.
🧠 1
🙏 1
20 Views