Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use ListView instead of RecyclerView

I've been reading about RecyclerView and it's advantages over ListView And I got the difference between them.

What I don't get is when to use ListView and when to use RecyclerView. And is the RecyclerView meant to replace ListView? Do I have to replace all my ListViews with RecyclerViews?

like image 414
Abdallah Alaraby Avatar asked Feb 09 '15 15:02

Abdallah Alaraby


1 Answers

is the RecyclerView meant to replace ListView?

Yes.

Do I have to replace all my ListViews with RecyclerViews?

No.

What I don't get is when to use ListView and when to use RecyclerView.

My recommendation is to use only RecyclerView for lists going forward. It is meant as a replacement for ListView, and it is a fantastic one at that. I would expect RecyclerView to continue to receive updates, but ListView will likely remain more or less as it is right now.

ListView isn't going anywhere because there are far too many applications that use it. Google can't just remove it because that would prevent most existing apps from compiling with the latest SDK. Deprecating it also isn't ideal because converting a ListView to a RecyclerView is a non-trivial amount of work and there isn't anything particularly broken with ListView.

like image 97
Bryan Herbst Avatar answered Oct 06 '22 00:10

Bryan Herbst