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

Manuel Wrage

11/01/2019, 10:37 AM
I'm trying to replicate flutters Listview widget but don't really know how to do it. Is it possible with the current apis? I already tried to only layout placeables that are in a specific range and it kind of works but is really slow. So i guess thats not the way to go.
l

Luca Nicoletti

11/01/2019, 10:38 AM
Not for now, the only way is to use a
VerticalScroller
with a
Column
which accepts all your children `@Composable`s
m

Manuel Wrage

11/01/2019, 10:43 AM
I know but i wanna write a ScrollingList composable by myself. Maybe it's possible by recomposing on scroll changes and emit only the necessary amount of items to fill the viewport.
l

Luca Nicoletti

11/01/2019, 10:46 AM
I’d emulate the recyclerview behaviour
l

Leland Richardson [G]

11/01/2019, 4:39 PM
doing this isn’t trivial… we plan on making a component like this but it will likely involve us surfacing some amount of information from the layout and draw layer that isn’t there yet
3 Views