Wednesday, March 1, 2017

What is the difference between ArrayAdapter , BaseAdapter and ListAdapter

ArrayAdapter :
It is a concrete class which works with array of data. you just  need to override only getview method

Listadapter
It is a an interface . So you need to implement it with concrete adapter classes.

BaseAdapter 
It is abstract class. It implements ListAdapter, SpinnerAdapter.
Its a base class for ArrayAdapter<T>, CursorAdapter, SimpleAdapter .
So you need to extend the BaseAdapter class by concrete class.  you need to implement all the methods like getcount,getid etc.

Array adapter and listadapter classes are developed since in general we deal with the array data sets and list data sets
BaseAdapter  is a base class for all the adapters.