When an Activity
’s primary task is to display a scrollable list of items, you can extend class ListActivity (package android.app
), which uses a ListView
that occupies the entire app as its default layout. ListView
is a subclass of AdapterView (package android.widget
)—a GUI component is bound to a data source via an Adapter object (package android.widget
). In this app, we use an ArrayAdapter (package android.widget
) to create an object that populates the ListView
using data from an ArrayList
collection object. This is known as data binding. Several types of AdapterView
s can be bound to data using an Adapter
. In Chapter 8, you’ll learn how to bind database data to a ListView
. For more details on data binding in Android and several tutorials, visit