O'Reilly logo

Android Application Development: A Beginner’s Tutorial by Budi Kurniawan

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

Chapter 8

ListView

A ListView is a view for showing a scrollable list of items, which may come from a list adapter or an array adapter. Selecting an item in a ListView triggers an event for which you can write a listener.

If an activity contains only one view that is a ListView, you can extend ListActivity instead of Activity as your activity class. Using ListActivity is convenient as it comes with a number of useful features.

This chapter shows how you can use the ListView and ListActivity as well as create a custom ListAdapter and style a ListView in three sample applications.

Overview

Technically, android.widget.ListView, the template for creating a ListView, is a descendant of the View class. You can use it the same way you would other views. ...

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