This sample demonstrates the use of XML adapters.
An XML Adapter is an XML file which defines the bindings between the data
retrieved from a
ContentProvider
and the different views of a layout. They are provided by the
Adapters
class.
Three list activities are provided which illustrate this:
-
ContactsListActivity uses the device's Contacts provider as its input source.
Contacts with a phone number are displayed, their photo being retrieved by a dedicated
ContactPhotoBinder
.
-
PhotosListActivity retrieves an RSS photo feed and displays the images and their
titles. The images are downloaded from the URL found in the feed using the
ImageDownloader
helper class.
-
RssReaderActivity also displays items extracted from an RSS feed. An additional
UrlIntentListener
is used to open a browser when one of the news item is tapped.