0 votes
in JQuery by

 In what situation should one use RecyclerView over ListView?

1 Answer

0 votes
by

RecyclerView was created as a ListView improvement, so yes, you can create an attached list with ListView control, but using RecyclerView is easier as it:

  • Reuses cells while scrolling up/down - this is possible with implementing View Holder in the ListView adapter, but it was an optional thing, while in the RecycleView it's the default way of writing adapter.
  • Decouples list from its container - so you can put list items easily at run time in the different containers (linearLayout, gridLayout) with setting LayoutManager.

To conclude, 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.

Related questions

0 votes
asked Sep 21, 2020 in JQuery by JackTerrance
+1 vote
0 votes
asked Jun 23, 2020 in JQuery by AdilsonLima
...