Should we use RecyclerView to replace ListView? [closed]

Android Docs say:

The RecyclerView widget is a more advanced and flexible version of
ListView. This widget is a container for displaying large data sets
that can be scrolled very efficiently by maintaining a limited number
of views. Use the RecyclerView widget when you have data collections
whose elements change at runtime based on user action or network
events

Actually ListView can do all of the above if efficiency doesn’t matter, and we have found many issues when we use RecyclerView to replace ListView:

  1. There is no onItemClickListener() for list item selection – solution

  2. No divider between list items – solution

  3. No built-in overlap selector, there is no visual feedback when you click list item – solution

  4. No addHeaderView for list header – solution

Maybe more issues …

So when we use RecyclerView to replace ListView, we have to do much extra coding to reach the same effect as ListView.

QUESTION:

  • Is it worth that we replace ListView with RecyclerView totally ?
  • if not then in which case should we better use RecyclerView instead ListView, and vice versa ?

5 Answers
5

Leave a Comment