968 B
RecyclerView
The RecyclerView
is an enhanced version of the ListView
and the GridView
. It is a more advanced and flexible version of ListView
. In RecyclerView
, there are several different components that work together to display your data. The RecyclerView.Adapter
is similar to the BaseAdapter
; it takes data and turns it into views that can be inserted in the RecyclerView
layout. On the other hand, the RecyclerView.LayoutManager
helps positioning items inside the RecyclerView
and determining the behavior when scrolling. A third significant component is RecyclerView.ViewHolder
. It provides references to the views for each data item which help to reduce unnecessary calls to findViewById()
. It's also important to mention that the RecyclerView
class supports not only lists but also a custom implementation of horizontal or vertical lists, grids, or staggered grids while offering more opportunities for fantastic custom animations.