blob: e1af3179a3aa3a16629c44c599b35a93daed4b5f [file] [log] [blame]
Adam Cohen1ff28c72011-02-10 18:19:50 -08001<p>
2 This sample shows how to construct a simple collection widget. This particular example shows how
3 to create a widget containing a <a href="../../../reference/android/widget/StackView.html"><code>StackView</code></a>
4 ; however, only minimal changes are required to include
5 a <a href="../../../reference/android/widget/ListView.html"><code>ListView</code></a>,
6 <a href="../../../reference/android/widget/GridView.html"><code>GridView</code></a> or
7 <a href="../../../reference/android/widget/AdapterViewFlipper.html"><code>AdapterViewFlipper</code></a> instead.
8</p>
9<p>
10 The sample demonstrates the following:
11</p>
12 <ul>
13 <li>
14 The pattern for creating and wiring a <a href="../../../reference/android/widget/RemoteViewsService.html"><code>RemoteViewsService</code></a>
15 and <a href="../../../reference/android/widget/RemoteViewsService.RemoteViewsFactory.html"><code>RemoteViewsFactory</code></a> which
16 serve the function of an adapter for the widget collection.
17 </li>
18 <li>
19 The pattern for setting an intent template and fill-in intents in order to
20 provide children of the collection with click behaviour.
21 </li>
22 <li>
23 How to make a widget with a <a href="../../../reference/android/widget/StackView.html"><code>StackView</code></a>
24 (or <a href="../../../reference/android/widget/AdapterViewFlipper.html"><code>AdapterViewFlipper</code></a>) auto-advance.
25 </li>
26 <li>
27 How to set a widget preview image.
28 </li>
29 </ul>
30<img alt="The widget."
31 src="../images/StackWidget.png"/>