When to use `ScrollableColumn` vs `LazyColumn` ? I...
# compose
k
When to use
ScrollableColumn
vs
LazyColumn
? Is it equivalent to RecyclerView vs ListView?
👌 1
s
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
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
The former is going to be deprecated.
a
Right, replaced by a modifier that adds the scrolling behavior to any container
c
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
that is my understanding as well.
a
ScrollableColumn : ScrollView :: LazyColumn : RecyclerView
🙌 1
🙏 1
👍 5