From 30073fb13b813af0be02239da28f6b711f094358 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Fri, 21 Oct 2011 17:23:10 -0700 Subject: [PATCH] Adding a code sample for how to write a custom action provider. NOTE: This change does *not* affect the system image rather only the SDK. bug:5499856 Change-Id: I589ed412b72e94b21dbe1f069006c7c527a06c71 --- samples/ApiDemos/AndroidManifest.xml | 13 +- samples/ApiDemos/_index.html | 7 +- .../drawable-hdpi/ic_launcher_settings.png | Bin 0 -> 7230 bytes .../drawable-mdpi/ic_launcher_settings.png | Bin 0 -> 4122 bytes .../drawable-xhdpi/ic_launcher_settings.png | Bin 0 -> 11183 bytes .../action_bar_settings_action_provider.xml | 34 +++++ .../action_bar_settings_action_provider.xml | 28 ++++ ...l => action_bar_share_action_provider.xml} | 0 samples/ApiDemos/res/values/strings.xml | 5 +- ...tionBarSettingsActionProviderActivity.java | 121 ++++++++++++++++++ ...ActionBarShareActionProviderActivity.java} | 4 +- .../com/example/android/apis/app/_index.html | 10 +- 12 files changed, 211 insertions(+), 11 deletions(-) create mode 100644 samples/ApiDemos/res/drawable-hdpi/ic_launcher_settings.png create mode 100644 samples/ApiDemos/res/drawable-mdpi/ic_launcher_settings.png create mode 100644 samples/ApiDemos/res/drawable-xhdpi/ic_launcher_settings.png create mode 100644 samples/ApiDemos/res/layout/action_bar_settings_action_provider.xml create mode 100644 samples/ApiDemos/res/menu/action_bar_settings_action_provider.xml rename samples/ApiDemos/res/menu/{action_bar_action_provider.xml => action_bar_share_action_provider.xml} (100%) create mode 100644 samples/ApiDemos/src/com/example/android/apis/app/ActionBarSettingsActionProviderActivity.java rename samples/ApiDemos/src/com/example/android/apis/app/{ActionBarActionProviderActivity.java => ActionBarShareActionProviderActivity.java} (96%) diff --git a/samples/ApiDemos/AndroidManifest.xml b/samples/ApiDemos/AndroidManifest.xml index 4a4a7c3eb..2449e062e 100644 --- a/samples/ApiDemos/AndroidManifest.xml +++ b/samples/ApiDemos/AndroidManifest.xml @@ -816,8 +816,17 @@ - + + + + + + + diff --git a/samples/ApiDemos/_index.html b/samples/ApiDemos/_index.html index 002ca1585..9466c95b5 100644 --- a/samples/ApiDemos/_index.html +++ b/samples/ApiDemos/_index.html @@ -20,9 +20,12 @@ that illustrate the use of various Android APIs. It includes samples of:

Update: The following are some of the new demos for Android 4.0: