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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.