Understanding Adapters

Before we get into the details of list controls of Android, we need to talk about adapters. List controls are used to display collections of data. But instead of using a single type of control to manage both the display and the data, Android separates these two responsibilities into list controls and adapters. List controls are classes that extend android.widget.AdapterView and include ListView, GridView, Spinner, and Gallery (see Figure 6–8).

Image

Figure 6–8. AdapterView class hierarchy

AdapterView itself extends android.widget.ViewGroup, which means that ListView, GridView, and so on are container controls. In other words, ...

Get Pro Android 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.