RecyclerView info
The RecyclerView
was introduced with Android 5.0 (Lollipop)
. it is included in the Support Library. Thus, it is compatible with Android API Level 7.
Similarly to the ListView
, RecyclerView’s
main idea is to provide listing functionality in a performance friendly manner. The ‘Recycler’ part of this view’s name is not there by coincidence. The RecyclerView
can actually recycle the items with which it’s currently working. The recycling process is done thanks to a pattern called View Holder.
Pros & Cons of RecyclerView
Pros:
Cons:
ListView info
The ListView
has been around since the very beginning of Android. It was available even in API Level 1
and it has the same purpose as the RecyclerView
.
The usage of the ListView is actually really simple. In this aspect, it’s not like its successor. The learning curve is smoother than the one for the RecyclerView. Thus, it is easier to grasp. We don’t have to deal with things like the LayoutManager, ItemAnimator or DiffUtil.
Pros & Cons of ListView
Pros:
ExpandableListView
Cons: