When to use ListView instead of RecyclerView

I read about RecyclerView , and this is an advantage over ListView And I got the difference between them.

What I am not getting is when to use ListView and when to use RecyclerView. And is RecyclerView a replacement for ListView? Should I replace all my ListViews with RecyclerViews?

+5
source share
2 answers

Is it a RecyclerView designed to replace ListView?

Yes.

Do I need to replace all my ListViews with RecyclerViews?

Not.

What I am not getting is when to use ListView and when to use RecyclerView.

My recommendation is to use only RecyclerView to jump forward. This means replacing the ListView , and it's fantastic. I would expect RecyclerView continue to receive updates, but the ListView is likely to remain more or less as it is now.

ListView not going anywhere, because there are too many applications that use it. Google cannot simply remove it, as this will prevent most existing applications from compiling with the latest SDK. Fatigue is also not ideal, because converting a ListView to a RecyclerView is a non-trivial amount of work, and there is nothing special about ListView .

+6
source

RecyclerView is the successor to ListView, so you should use it for all new code, but it does not inherently need to replace all ListViews now

+1
source

Source: https://habr.com/ru/post/1212975/


All Articles