rewrite HC Gallery app to support phones. In summary, this change:
- moves tablet-style layouts to layout-large* directories
- adds ContentActivity to host the ContentFragment when on phones
- adds an OnItemSelectedListener interface to TitlesFragment, which MainActivity
implements in order to receive callbacks on click events to the list item and then
pass the selected item to the ContentFragment in the manner appropriate for the
current configuration... Specifically, when in two-pane mode, it updates the ContentFragment
directly, and when in single-pane mode, it starts the ContentActivity with intent data
about the selected item, which then updates the ContentFragment
- Change CameraSample.java to CameraActivity.java for name conventions
- Moves all menu strings into string resources
- Fixes camera sample to properly handle front-facing camera on other devices (was broken
on nexus s and on g-slate)
- Fixes camera sample to handle resume state after the camera has changed (for example, when
switched to a different camera, it would crash on resume)
- Moves various code around between classes as appropriate for the fragment handling the
action. For example, move the ActionBar.TabListener implementation to the TitlesFragment
(was originally impemented by the MainActivity)
- Adds logic to support devices without camera and properly declare the camera in manifest as such
- Maintains the state of hidden titles list across restarts
Change-Id: I27a39a68dee37325c0c3607aa0b56ab6c134d026
17 files changed