Using Adapters with AdapterViews

Now that you've been introduced to adapters, it is time to put them to work for us, providing data for list controls. In this section, we're going to first cover the basic list control, the ListView. Then, we'll describe how to create your own custom adapter, and finally, we'll describe the other types of list controls: GridViews, spinners, and the gallery.

The Basic List Control: ListView

The ListView control displays a list of items vertically. That is, if we've got a list of items to view and the number of items extends beyond what we can currently see in the display, we can scroll to see the rest of the items. You generally use a ListView by writing a new activity that extends android.app.ListActivity. ListActivity ...

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.