Android AbsListView

February 2, 2018 Oclemy Android ListView 0 minutes, 45 seconds

This is an abstract class that meant to be used to implement virtualized lists(and grids,carousels,stacks etc) of items.

This class derives from AdapterView.

public abstract class AbsListView extends AdapterView<ListAdapter>

Several classes derive from this class:

View SubClass Type Description
GridView Direct Renders Items in a 2D scrolling grid.
ListView Direct Renders items in a scrollable vertical list.
ExpandableListeView Indirect Renders items in a scrollable vertical two level list.

AbsListView has been available since Android API Level 1 and resides in the android.widget package.

Normally to render items, you won't use AbsListView, instead you'll use its children like ListView and GridView.

AbsListView is just the base class that provides the necessary abstraction to hold any type of list, be it grid, carousel or stack for these views.

AbsListView's subclasses like ListView and GridView rely on adapter for data binding. This is because AbsListView itself is an AdapterView.