summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2010-07-15 10:16:33 -0700
committerAdam Powell <adamp@google.com>2010-07-16 10:22:31 -0700
commit8028dd32a4a04154050220dd0693583d5b750330 (patch)
treece58b851e08bed78e35d19d088dd0d755ce2a891 /policy
parenteb857f12d605659b385d168ef1ea7d4ba5193585 (diff)
downloadframeworks_base-8028dd32a4a04154050220dd0693583d5b750330.zip
frameworks_base-8028dd32a4a04154050220dd0693583d5b750330.tar.gz
frameworks_base-8028dd32a4a04154050220dd0693583d5b750330.tar.bz2
Overflow menu for action bars.
The overflow menu replaces the normal options menu panel for activities with an action bar. It always appears as the rightmost action button and is displayed as a dropdown menu. The menu key summons and dismisses the overflow menu instead of the options panel where applicable. Change-Id: I0b4fa7e36f35ab12e2f0c1d12bec79ccab8cc4b1
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 070d1e8..cc91f31 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -1381,8 +1381,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
}
case KeyEvent.KEYCODE_MENU: {
- onKeyUpPanel(featureId < 0 ? FEATURE_OPTIONS_PANEL : featureId,
- event);
+ if (mActionBar != null && mActionBar.isOverflowReserved()) {
+ mActionBar.showOverflowMenu();
+ } else {
+ onKeyUpPanel(featureId < 0 ? FEATURE_OPTIONS_PANEL : featureId,
+ event);
+ }
return true;
}