How can I combine 2 or more LazyRow/LazyVerticalGr...
# compose
s
How can I combine 2 or more LazyRow/LazyVerticalGrid calls? I am trying to create a gridlayout with sections. Without compose I used
ConcatAdapter
once and it was very easy.
d
Use one
LazyRow
and call
items
twice?
s
I am trying to create a grid view with sections. result is like when I call items + item + items:
d
Oh you want headers. Tricky.
s
yeah, I checked for size lookup for
LazyVerticalGrid
did not find anything related. probably I will need to dig it up in the source code.
d
There's a ticket for sticky headers, can't seem to find it now. 😞
s
hmm, good to know. I will search tomorrow. thanks for notice.
k
What's your expected output?
s
in general section headers lay down between sections, separating them distinctly.
k
How about
Copy code
Column {
    LazyRow ( ) { ....}
    Text ( ) { ... } // Standard Text Composable
    LazyRow ( ) { ... }
}
If you need, you might use
ScrollableColumn
as root Composable
s
second Lazy Row is not rendered.
LazyRow inside ScrollableColumn gives another error about nested scrolls.
a
we want to support spans count in the future so in LazyVerticalGrid you would be able to add an item which would take more than one span
for now you have to manually implement it with LazyColumn and emit rows with 3 elements or header
s
@Andrey Kulikov is there any open ticket for this, so maybe I can track/contribute ?
a
no, I think we didn’t yet file a ticket for it. feel free to create
👍 1
🙏 1
@allan.conda ^^
a
Thanks!!
👍 1
s
@Yasin Kaçmaz ^^