| 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 |
| 2 | Honeycomb, including Fragments, the Action Bar, drag'n drop, transition |
| 3 | animations, and a stack widget. The image gallery shows how all these pieces |
| 4 | can work together in one application.</p> |
| 5 | |
| 6 | <p>The application includes the following classes:<p> |
| 7 | <ul> |
| 8 | <li><a href="src/com/example/android/hcgallery/ContentFragment.html">ContentFragment</a> |
| 9 | A fragment responsible for containing the "content" of the application. |
| 10 | Displays images, receives drag/drop events from other fragments.</li> |
| 11 | <li><a href="src/com/example/android/hcgallery/TitlesFragment.html">TitlesFragment</a> |
| 12 | Shows a ListView of photos to display in the ContentFragment. Photos can |
| 13 | be chosen either by tapping on the listview, or dragging them from the |
| 14 | list to the content area. The list of photos displayed depends on the |
| 15 | category selected in the ActionBar.</li> |
| 16 | <li><a href="src/com/example/android/hcgallery/MainActivity.html">MainActivity</a> |
| 17 | This is the main entry point of the application. MainActivity is |
| 18 | responsible for initialization of the ActionBar, TitlesFragment, and |
| 19 | ContentFragment. MainActivity is also responsible for keeping track of |
| 20 | the currently selected theme and currently selected photo when the |
| 21 | activity is recreated, such as when the screen is rotated or an intent to |
| 22 | a seperate activity is fired (such as the included Camera sample). |
| 23 | MainActivity also contains code demonstrating how to animate |
| 24 | showing/hiding fragments (in this case, the TitlesFragment) and the |
| 25 | ActionBar, demonstrating how to smoothly transition between states |
| 26 | in your application.</li> |
| 27 | <li><a href="src/com/example/android/hcgallery/widget/WidgetProvider.html">WidgetProvider</a> |
| 28 | The WidgetProvider class is an implementation of the AppWidgetProvider |
| 29 | class, which is a view that can be embedded in other applications. |
| 30 | This class is responsible for handling when the instance of this widget |
| 31 | is enabled, disabled, created, deleted, or updated.</li> |
| 32 | <li><a href="src/com/example/android/hcgallery/widget/WidgetService.html">WidgetService</a> |
| 33 | The WidgetService is an implementation of the RemoteViewsService class, |
| 34 | which is used to populate the collection view (in this case, a stack |
| 35 | widget)</li> </ul> |
| 36 | |
| 37 | <img alt="Screenshot" src="../images/hcgallery.png" /> |