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

pardom

05/23/2020, 2:40 PM
What's the best way to add a header to an
AdapterList
? Can it be nested in a
VerticalScroller
?
a

Adam Powell

05/23/2020, 2:49 PM
Treat it as a list item. No, it cannot be nested in a `VerticalScroller`; the same rules from RecyclerView apply to AdapterList, but we're looking to make the API easier to do these kinds of things with. There are some early design experiments with an adapter DSL that allows for assembling trees of different data sources, such as headers.
🎉 5
we might have something along those lines showing up in the repository as
@Experimental
in some form in the next few dev releases, not sure about the timeline yet
but if you'd like to play with writing similar kinds of components,
AdapterList.kt
is pretty short and a good amount of the code mass is comments 🙂
2 Views