The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Widget Catalog: AdapterViewFlipper

A regular ViewFlipper shows only one child widget or container at a time. So does an AdapterViewFlipper. The difference is where the children come from. With a regular ViewFlipper, you add children much like you would any other standard container class, such as defining the children in your layout XML resource. With AdapterViewFlipper, the children come from an Adapter.

While AdapterViewFlipper does not inherit from ViewFlipper (or vice versa, for that matter), their public API is largely the same:

There are two key advantages for AdapterViewFliper:

  1. Since it uses an Adapter model, it can be more memory efficient for lots of children, through child view recycling
  2. It is available for use in an app widget

However, AdapterViewFlipper is new to API Level 11 and is unavailable on older versions of Android. It is not included in the Android Support package backport.

Key Usage Tips

All of the usage tips from ViewFlipper are relevant for AdapterViewFlipper.

A Sample Usage

The preview of this section was lost due to a rupture in the space-time continuum.

Visual Representation

The preview of this section is in the process of being translated from its native Klingon.