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

enighma

03/31/2022, 6:13 PM
I’ve been playing with
LazyVerticalGrid
and I want to have a fixed number of columns but I don’t want it to take all available vertical size. Is there a way to have it wrap on the width? I tried providing
modifier = Modifier.wrapContentWidth()
but it’s still taking all available width
a

Adam Powell

03/31/2022, 6:27 PM
what content would it wrap to?
e

enighma

03/31/2022, 6:42 PM
the max width of a column.
I think this is how html tables work for instance
That is understandably more complex and hard to do performant
a

Adam Powell

03/31/2022, 10:45 PM
yes, that's not something the
Lazy
layouts are going to do if it means composing and measuring the entire data set
if your data set is small enough to do that then you can use a much simpler grid layout based on the
Layout
composable
e

enighma

03/31/2022, 11:34 PM
Ah yes, for a lazy list it does not make sense, since you need to know the entire set as you say. Are there any plans to create a non-lazy grid with this property? I can write my own using Layout, just curious to know
a

Adam Powell

03/31/2022, 11:59 PM
It's not a short-term priority for the team right now
👍 1
4 Views