O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lists and Adapters

Two components are required for any list implementation in Android: a ListView widget and an adapter. The ListView widget is an object that can display a vertical list of items that can be scrolled through. An Adapter is dynamically associated with the ListView. The adapter provides access to the underlying data source for the list. In the case of a simple list, after an adapter is associated with the widget, insertion of data as a list item is handled automatically. In the case of a complex list, the developer must create a subclass of an Adapter object and code the display and behavior of the list in the new subclass.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required