From f4f345d0b75c96d92f15a9aba8d58d5d4bec27c6 Mon Sep 17 00:00:00 2001 From: Roman Nurik Date: Fri, 4 Feb 2011 15:27:25 -0800 Subject: [PATCH] Major update to HoneycombGallery * Add action bar and icon theming * Add contextual action bar and photo sharing * Add notifications (with large icons too) * Add fullscreening (lights-out mode) * Add a picture frame Change-Id: I07a1da435d5adc7bc76c7ac2cc087ff2efd74156 --- build/sdk.atree | 2 +- samples/Honeycomb-Gallery/Android.mk | 2 +- samples/Honeycomb-Gallery/AndroidManifest.xml | 12 +- samples/Honeycomb-Gallery/_index.html | 28 ++- .../res/drawable-hdpi/android_logo.png | Bin 7385 -> 0 bytes .../btn_notification_ic_example_default.png | Bin 0 -> 1044 bytes .../btn_notification_ic_example_pressed.png | Bin 0 -> 1583 bytes .../res/drawable-hdpi/ic_menu_camera.png | Bin 1700 -> 0 bytes .../ic_menu_camera_holo_dark.png | Bin 0 -> 2788 bytes .../ic_menu_camera_holo_light.png | Bin 0 -> 1785 bytes .../drawable-hdpi/ic_menu_share_holo_dark.png | Bin 0 -> 3213 bytes .../ic_menu_share_holo_light.png | Bin 0 -> 2025 bytes .../res/drawable-hdpi/ic_menu_toggle.png | Bin 1627 -> 0 bytes .../ic_menu_toggle_holo_dark.png | Bin 0 -> 2714 bytes .../ic_menu_toggle_holo_light.png | Bin 0 -> 1741 bytes .../drawable-hdpi/ic_stat_notify_example.png | Bin 0 -> 1707 bytes .../drawable-hdpi/picture_frame_default.9.png | Bin 0 -> 1695 bytes .../drawable-hdpi/picture_frame_pressed.9.png | Bin 0 -> 1728 bytes .../picture_frame_selected.9.png | Bin 0 -> 1729 bytes .../btn_notification_ic_example_default.png | Bin 0 -> 1013 bytes .../btn_notification_ic_example_pressed.png | Bin 0 -> 1289 bytes .../res/drawable-mdpi/ic_menu_camera.png | Bin 1423 -> 0 bytes .../ic_menu_camera_holo_dark.png | Bin 0 -> 1992 bytes .../ic_menu_camera_holo_light.png | Bin 0 -> 1540 bytes .../drawable-mdpi/ic_menu_share_holo_dark.png | Bin 0 -> 2057 bytes .../ic_menu_share_holo_light.png | Bin 0 -> 1524 bytes .../res/drawable-mdpi/ic_menu_toggle.png | Bin 1410 -> 0 bytes .../ic_menu_toggle_holo_dark.png | Bin 0 -> 1982 bytes .../ic_menu_toggle_holo_light.png | Bin 0 -> 1500 bytes .../drawable-mdpi/ic_stat_notify_example.png | Bin 0 -> 1466 bytes .../drawable-mdpi/picture_frame_default.9.png | Bin 0 -> 1426 bytes .../drawable-mdpi/picture_frame_pressed.9.png | Bin 0 -> 1458 bytes .../picture_frame_selected.9.png | Bin 0 -> 1459 bytes .../notification_default_largeicon.png | Bin 0 -> 9998 bytes .../drawable/btn_notification_ic_example.xml | 20 ++ .../res/drawable/picture_frame.xml | 21 ++ .../res/layout/content_welcome.xml | 17 +- .../res/layout/notification.xml | 60 +++++ .../Honeycomb-Gallery/res/menu/main_menu.xml | 17 +- .../res/menu/photo_context_menu.xml | 23 ++ .../Honeycomb-Gallery/res/values/attrs.xml | 24 ++ .../Honeycomb-Gallery/res/values/colors.xml | 1 + .../Honeycomb-Gallery/res/values/strings.xml | 6 +- .../Honeycomb-Gallery/res/values/styles.xml | 45 ++++ .../android/hcgallery/ContentFragment.java | 230 +++++++++++++++--- .../hcgallery/FitCenterFrameLayout.java | 108 ++++++++ .../android/hcgallery/MainActivity.java | 122 ++++++++-- .../android/hcgallery/TitlesFragment.java | 42 ++-- 48 files changed, 668 insertions(+), 112 deletions(-) delete mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/android_logo.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/btn_notification_ic_example_default.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/btn_notification_ic_example_pressed.png delete mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_camera.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_camera_holo_dark.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_camera_holo_light.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_share_holo_dark.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_share_holo_light.png delete mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_toggle.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_toggle_holo_dark.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_menu_toggle_holo_light.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/ic_stat_notify_example.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/picture_frame_default.9.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/picture_frame_pressed.9.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-hdpi/picture_frame_selected.9.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/btn_notification_ic_example_default.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/btn_notification_ic_example_pressed.png delete mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_camera.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_camera_holo_dark.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_camera_holo_light.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_share_holo_dark.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_share_holo_light.png delete mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_toggle.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_toggle_holo_dark.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_menu_toggle_holo_light.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/ic_stat_notify_example.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/picture_frame_default.9.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/picture_frame_pressed.9.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-mdpi/picture_frame_selected.9.png create mode 100644 samples/Honeycomb-Gallery/res/drawable-nodpi/notification_default_largeicon.png create mode 100644 samples/Honeycomb-Gallery/res/drawable/btn_notification_ic_example.xml create mode 100644 samples/Honeycomb-Gallery/res/drawable/picture_frame.xml create mode 100644 samples/Honeycomb-Gallery/res/layout/notification.xml create mode 100644 samples/Honeycomb-Gallery/res/menu/photo_context_menu.xml create mode 100644 samples/Honeycomb-Gallery/res/values/attrs.xml create mode 100644 samples/Honeycomb-Gallery/res/values/styles.xml create mode 100644 samples/Honeycomb-Gallery/src/com/example/android/hcgallery/FitCenterFrameLayout.java diff --git a/build/sdk.atree b/build/sdk.atree index c8ec963d5..f224d50fa 100644 --- a/build/sdk.atree +++ b/build/sdk.atree @@ -162,7 +162,7 @@ development/samples/ContactManager samples/${PLATFORM_NAME}/ContactMan development/samples/CrossCompatibility samples/${PLATFORM_NAME}/CrossCompatibility development/samples/CubeLiveWallpaper samples/${PLATFORM_NAME}/CubeLiveWallpaper development/samples/Home samples/${PLATFORM_NAME}/Home -development/samples/Honeycomb-Gallery samples/${PLATFORM_NAME}/Honeycomb-Gallery +development/samples/HoneycombGallery samples/${PLATFORM_NAME}/HoneycombGallery development/samples/JetBoy samples/${PLATFORM_NAME}/JetBoy development/samples/LunarLander samples/${PLATFORM_NAME}/LunarLander development/samples/MultiResolution samples/${PLATFORM_NAME}/MultiResolution diff --git a/samples/Honeycomb-Gallery/Android.mk b/samples/Honeycomb-Gallery/Android.mk index 01788afb0..e56ae1575 100644 --- a/samples/Honeycomb-Gallery/Android.mk +++ b/samples/Honeycomb-Gallery/Android.mk @@ -6,7 +6,7 @@ LOCAL_MODULE_TAGS := samples # Only compile source java files in this apk. LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PACKAGE_NAME := Honeycomb-Gallery +LOCAL_PACKAGE_NAME := HoneycombGallery LOCAL_SDK_VERSION := current diff --git a/samples/Honeycomb-Gallery/AndroidManifest.xml b/samples/Honeycomb-Gallery/AndroidManifest.xml index cab59c15e..60fd4c62f 100644 --- a/samples/Honeycomb-Gallery/AndroidManifest.xml +++ b/samples/Honeycomb-Gallery/AndroidManifest.xml @@ -19,20 +19,28 @@ android:versionName="1.0"> + + - + + + + + diff --git a/samples/Honeycomb-Gallery/_index.html b/samples/Honeycomb-Gallery/_index.html index 51605277c..963661e98 100644 --- a/samples/Honeycomb-Gallery/_index.html +++ b/samples/Honeycomb-Gallery/_index.html @@ -1,13 +1,27 @@

This is a demo application highlighting how to use some of the new APIs in -Honeycomb, including Fragments, the Action Bar, drag'n drop, transition -animations, and a stack widget. The image gallery shows how all these pieces -can work together in one application.

+Honeycomb, including:

-

The application includes the following classes:

+

+ +

The image gallery shows how all these pieces can work together in one application.

+ +

The application includes the following key classes: