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.
Asked
Active
Viewed 5,793 times
5
-
Have you googled it! – Ozan Nov 20 '15 at 15:05
-
It was a legit question and there is no reason for down vote! I up voted it for you man. – Sam Ramezanli Jul 18 '16 at 15:07
1 Answers
9
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.