I saw you can use a list view to list any view object. But in most of code examples they use a recycler view. So my question is: When you could use a list view instead of a recycler view ?.
Asked
Active
Viewed 179 times
1
-
2https://stackoverflow.com/questions/26728651/recyclerview-vs-listview hope this helps – Spiker Jan 06 '20 at 04:22
1 Answers
6
The RecyclerView
widget is a more advanced and flexible version of ListView
.
RecyclerView
was created as aListView
improvement,- In the
RecyclerView
model, several different components work together to display your data. The overall container for your user interface is aRecyclerView
object that you add to your layout. RecyclerView
drastically improve performance- The
RecyclerView
fills itself with views provided by a layout manager that you provide. - Advantages of
RecyclerView
is- Efficiently Reuses cells while scrolling up/down
- Decouples list from its container
- Animations are decoupled and delegated to
ItemAnimator
- RecyclerView is a more flexible control for handling "list data" that follows patterns of delegation of concerns and leaves for itself only one task - recycling items

Pranav MS
- 2,235
- 2
- 23
- 50
-
ListView also recycles item views, so that specifically isn't an advantage. – Tenfour04 Jan 06 '20 at 14:50