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