Reputation: 229
I am new to android development and I came across these 3 different options ListView, AbsListView and RecyclerView to create a List in android. What is the difference between these 3.
Upvotes: 5
Views: 6017
Reputation: 580
First, AbsListView
is an abstract class and can't be used as a View
element in application layout, although you can use it as a Base Class
to implement your own View
.
Before Lollipop, there wasn’t RecyclerView
, it was introduced as a part of Material Design. It introduced a new way of handling listeners.
You can read more in-depth explanation Here
Starting from Lollipop it is considered as good practice to use RecyclerView
instead of deprecated ListView
.
You can read how to use RecyclerView
at official android documentation given by google or use this great tutorial.
Upvotes: 9