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

Kshitij Patil

01/05/2021, 1:48 PM
When to use
ScrollableColumn
vs
LazyColumn
? Is it equivalent to RecyclerView vs ListView?
👌 1
s

Sinan Gunes

01/05/2021, 1:58 PM
afaik
LazyColumn
has similar use with
RecyclerView
. I don't know their difference in detail, but it seems their implementations are totally different. However both are optimized for large lists.
p

Prashant Priyadarshi

01/05/2021, 2:34 PM
personally I use scrollableColumn for laying out UI for the screen, while LazyColumn for something like fetching 100's of items from room db table and showing them also just check .. i think using ScrollableColumn with lots of different images for a list should give out of memory error... LazyColumn is like RecyclerView, so at a time only 5-10 items are loaded i.e the ones showing on screen
2
d

Dominaezzz

01/05/2021, 3:38 PM
The former is going to be deprecated.
a

Adam Powell

01/05/2021, 3:40 PM
Right, replaced by a modifier that adds the scrolling behavior to any container
c

Colton Idle

01/05/2021, 4:28 PM
Interesting. First time reading about scrollableColumn. Can someone let me know if I'm right here with my train of thought 1. I treat lazy column like a recyclerView 2. I treat a regular column for just a vertical linear layout
s

Sinan Gunes

01/05/2021, 4:31 PM
that is my understanding as well.
a

Adam Powell

01/05/2021, 8:50 PM
ScrollableColumn : ScrollView :: LazyColumn : RecyclerView
🙌 1
🙏 1
👍 5
8 Views