Pandiyan Mani
1 min readAug 13, 2021

--

listview vs recyclerview

Before Seeing difference between both lets see what is Recylerview

Recylerview is a view group which hold collection of data by using the help of viewholder it draws the data information to the UI.

Three component that holds Recylerview

1.Adapter → It takes the data set which has to be displayed to the user in RecyclerView

2.Viewholder — -> with help of it we draw the data to ui.

3.LayoutManager — >Decide which layout has to be called like grid,staggered or linear.

1.In listview it is not mandatory to implement viewholder pattern its optional wheres in Recylerview its mandatory to implement viewholder pattern by using this we can reuse the cells.

2.Recylerview can be converted in to

i) LinearLayoutManager — which supports both vertical and horizontal lists,

ii) StaggeredLayoutManager — which supports Pinterest like staggered lists,

iii) GridLayoutManager — which supports displaying grids as seen in Gallery apps.

3.Animation is laggy in listview but in Recylerview it has it default item animator.

--

--