to top
Android APIs
Sample Code >

StackWidget - StackView Widget

← Back

This sample shows how to construct a simple collection widget. This particular example shows how to create a widget containing a StackView ; however, only minimal changes are required to include a ListView, GridView or AdapterViewFlipper instead.

The sample demonstrates the following:

  • The pattern for creating and wiring a RemoteViewsService and RemoteViewsFactory which serve the function of an adapter for the widget collection.
  • The pattern for setting an intent template and fill-in intents in order to provide children of the collection with click behaviour.
  • How to make a widget with a StackView (or AdapterViewFlipper) auto-advance.
  • How to set a widget preview image.
The widget.

Subdirectories

Files