1 <p>This is a demo application highlighting how to use some of the new APIs in 2 Honeycomb, including:</p> 3 4 <ul> 5 <li><a href="../../../guide/topics/fundamentals/fragments.html">Fragments</a></li> 6 <li>The <a href="../../../guide/topics/ui/actionbar.html">action bar</a> 7 and contextual action bar</li> 8 <li>Drag and drop</li> 9 <li>The new <a href="../../../reference/android/animation/package-summary.html"><code>android.animation</code></a> 10 framework</li> 11 <li>Custom notifications</li> 12 <li>For information on how to implement <a href="../../../reference/android/widget/StackView.html"><code>StackView</code></a> 13 and other adapter-based app widgets, see <a href="../StackWidget/index.html">StackView App Widget</a></li> 14 </ul> 15 16 <p>The image gallery shows how all these pieces can work together in one application.</p> 17 18 <p class="note"><strong>Update:</strong> This app has been updated for Android 4.0 to support 19 handsets by reusing fragments in separate activities when on smaller screens.</p> 20 21 <p>The application includes the following key classes:<p> 22 <ul> 23 <li><a href="src/com/example/android/hcgallery/ContentFragment.html">ContentFragment</a> 24 A fragment responsible for containing the "content" of the application. 25 Displays images, receives drag/drop events from other fragments, and can 26 invoke the contextual action bar using 27 <a href="../../../reference/android/view/ActionMode.html">action modes</a>.</li> 28 <li><a href="src/com/example/android/hcgallery/TitlesFragment.html">TitlesFragment</a> 29 Shows a ListView of photos to display in the ContentFragment. Photos can 30 be chosen either by tapping on the listview, or dragging them from the 31 list to the content area. The list of photos displayed depends on the 32 category selected in the ActionBar.</li> 33 <li><a href="src/com/example/android/hcgallery/MainActivity.html">MainActivity</a> 34 This is the main entry point of the application. MainActivity is 35 responsible for initialization of the ActionBar, TitlesFragment, and 36 ContentFragment. MainActivity is also responsible for keeping track of 37 the currently selected theme and currently selected photo when the 38 activity is recreated, such as when the screen is rotated or an intent to 39 a separate activity is fired (such as the included Camera sample). 40 MainActivity also contains code demonstrating how to animate 41 showing/hiding fragments (in this case, the TitlesFragment) and the 42 ActionBar, demonstrating how to smoothly transition between states 43 in your application.</li></ul> 44 45 <img alt="Screenshot" src="../images/hcgallery.png" /> 46 <img alt="Screenshot" src="../images/hcgallery-phone1.png" /> 47 <img alt="Screenshot" src="../images/hcgallery-phone2.png" />