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