Alexander Lucas | 9f935c7 | 2011-01-11 17:24:40 -0800 | [diff] [blame] | 1 | <p>This is a demo application highlighting how to use some of the new APIs in |
Roman Nurik | f4f345d | 2011-02-04 15:27:25 -0800 | [diff] [blame] | 2 | Honeycomb, including:</p> |
Alexander Lucas | 9f935c7 | 2011-01-11 17:24:40 -0800 | [diff] [blame] | 3 | |
Roman Nurik | f4f345d | 2011-02-04 15:27:25 -0800 | [diff] [blame] | 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> |
Adam Cohen | 1ff28c7 | 2011-02-10 18:19:50 -0800 | [diff] [blame] | 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> |
Roman Nurik | f4f345d | 2011-02-04 15:27:25 -0800 | [diff] [blame] | 14 | </ul> |
| 15 | |
| 16 | <p>The image gallery shows how all these pieces can work together in one application.</p> |
| 17 | |
Scott Main | 34ff3e7 | 2011-10-14 04:20:16 -0700 | [diff] [blame] | 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 | |
Roman Nurik | f4f345d | 2011-02-04 15:27:25 -0800 | [diff] [blame] | 21 | <p>The application includes the following key classes:<p> |
Alexander Lucas | 9f935c7 | 2011-01-11 17:24:40 -0800 | [diff] [blame] | 22 | <ul> |
| 23 | <li><a href="src/com/example/android/hcgallery/ContentFragment.html">ContentFragment</a> |
Roman Nurik | f4f345d | 2011-02-04 15:27:25 -0800 | [diff] [blame] | 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> |
Alexander Lucas | 9f935c7 | 2011-01-11 17:24:40 -0800 | [diff] [blame] | 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 |
Roman Nurik | f4f345d | 2011-02-04 15:27:25 -0800 | [diff] [blame] | 39 | a separate activity is fired (such as the included Camera sample). |
Alexander Lucas | 9f935c7 | 2011-01-11 17:24:40 -0800 | [diff] [blame] | 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 |
Scott Main | 40b35dc | 2011-02-22 16:40:19 -0800 | [diff] [blame] | 43 | in your application.</li></ul> |
Alexander Lucas | 9f935c7 | 2011-01-11 17:24:40 -0800 | [diff] [blame] | 44 | |
Scott Main | 8e56770 | 2011-10-14 11:05:08 -0700 | [diff] [blame] | 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" /> |