https://kotlinlang.org logo
k

Kevin Janvier Chinabalire

10/26/2019, 1:39 PM
Hello guys i have just started #compose journey today and i will like to get some tutorial . like how to use
recyclerview
will fetch data from remote using retrofit . Can i use it to generate ios app like flutter ?
l

Luca Nicoletti

10/26/2019, 2:07 PM
There’s not
recyclerview
for now on
Compose
, just use `Row`s and `Column`s with a lot of childred in them
No, right now
Compose
is only on Android, not
Kotlin Native
p

Paul Woitaschek

10/26/2019, 2:14 PM
And is there scrolling at all?
Just found verticalscroller. But I assume it's not lazily but layouts everything at once?
l

Luca Nicoletti

10/26/2019, 2:21 PM
Yes, but since
Drawing
on canvas is faster than loading a resource file and populating it, it’s quite fast
I gave it a try with thousands of elements (even with cards, sort of complex layouts) and it’s fast enough
p

Pablichjenkov

10/26/2019, 3:09 PM
In RecyclerView resource inflation just happens when the cell view is created. After that, a pool of these cell Views are reused. Anyhows, The recycling API may become obsolete. Recycling may happen at the Composable group type level. We probably won't need to give the recyclerview an integer that identify the type of a cell. The scroller could be smart enough to identify when a group is out of the screen and reuse it later. Similar to what Litho does
r

Ryan Mentley

10/28/2019, 11:46 PM
we will have a RecyclerView replacement, it's just not ready yet. For now, our samples are eagerly composing their children.
👍 1
2 Views