summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-08-07 16:59:02 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-07 16:59:02 -0700
commit8868f9797c39e5fc7c9612fbb69d53f34f03f6a2 (patch)
treef22c6fa79912db1664c4dd78ce99404376b046d4 /core
parent30a6e38762769bc3e230c40520c1ac6a594188a0 (diff)
parentdfee59afb3e4cdcde38f6338f9360655de76da92 (diff)
downloadframeworks_base-8868f9797c39e5fc7c9612fbb69d53f34f03f6a2.zip
frameworks_base-8868f9797c39e5fc7c9612fbb69d53f34f03f6a2.tar.gz
frameworks_base-8868f9797c39e5fc7c9612fbb69d53f34f03f6a2.tar.bz2
Merge "Fix bug 5011824 - New Holo overflow menu for physical menu key devices"
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/IWindowManager.aidl7
-rw-r--r--core/res/res/layout/expanded_menu_layout.xml2
-rw-r--r--core/res/res/layout/list_menu_item_layout.xml2
-rwxr-xr-xcore/res/res/values/attrs.xml4
-rw-r--r--core/res/res/values/themes.xml31
5 files changed, 42 insertions, 4 deletions
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 81cd798..c7bf8e3 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -184,6 +184,13 @@ interface IWindowManager
*/
int watchRotation(IRotationWatcher watcher);
+ /**
+ * Determine the preferred edge of the screen to pin the compact options menu against.
+ * @return a Gravity value for the options menu panel
+ * @hide
+ */
+ int getPreferredOptionsPanelGravity();
+
/**
* Lock the device orientation to the current rotation. Sensor input will
* be ignored until thawRotation() is called.
diff --git a/core/res/res/layout/expanded_menu_layout.xml b/core/res/res/layout/expanded_menu_layout.xml
index 5d98773..f44a83f 100644
--- a/core/res/res/layout/expanded_menu_layout.xml
+++ b/core/res/res/layout/expanded_menu_layout.xml
@@ -16,5 +16,5 @@
<com.android.internal.view.menu.ExpandedMenuView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/expanded_menu"
- android:layout_width="296dip"
+ android:layout_width="?android:attr/panelMenuListWidth"
android:layout_height="wrap_content" />
diff --git a/core/res/res/layout/list_menu_item_layout.xml b/core/res/res/layout/list_menu_item_layout.xml
index 57091a1..aaff4c7 100644
--- a/core/res/res/layout/list_menu_item_layout.xml
+++ b/core/res/res/layout/list_menu_item_layout.xml
@@ -16,7 +16,7 @@
<com.android.internal.view.menu.ListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="?android:attr/listPreferredItemHeight">
+ android:layout_height="?android:attr/listPreferredItemHeightSmall">
<!-- Icon will be inserted here. -->
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f70319b..eed41ea 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -439,6 +439,10 @@
<!-- Default appearance of panel text. -->
<attr name="panelTextAppearance" format="reference" />
+ <attr name="panelMenuIsCompact" format="boolean" />
+ <attr name="panelMenuListWidth" format="dimension" />
+ <attr name="panelMenuListTheme" format="reference" />
+
<!-- =================== -->
<!-- Other widget styles -->
<!-- =================== -->
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 615a37d..82299b8 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -185,6 +185,9 @@ please see themes_device_defaults.xml.
<item name="panelColorForeground">?android:attr/textColorPrimary</item>
<item name="panelTextAppearance">?android:attr/textAppearance</item>
+ <item name="panelMenuIsCompact">false</item>
+ <item name="panelMenuListWidth">296dip</item>
+
<!-- Scrollbar attributes -->
<item name="scrollbarFadeDuration">250</item>
<item name="scrollbarDefaultDelayBeforeFade">300</item>
@@ -755,6 +758,22 @@ please see themes_device_defaults.xml.
<item name="android:background">@null</item>
</style>
+ <style name="Theme.Holo.CompactMenu">
+ <!-- Menu/item attributes -->
+ <item name="android:itemTextAppearance">?android:attr/textAppearanceMedium</item>
+ <item name="android:listViewStyle">@android:style/Widget.Holo.ListView</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation.DropDownUp</item>
+ <item name="android:background">@null</item>
+ </style>
+
+ <style name="Theme.Holo.Light.CompactMenu">
+ <!-- Menu/item attributes -->
+ <item name="android:itemTextAppearance">?android:attr/textAppearanceMedium</item>
+ <item name="android:listViewStyle">@android:style/Widget.Holo.Light.ListView</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation.DropDownUp</item>
+ <item name="android:background">@null</item>
+ </style>
+
<!-- @hide -->
<style name="Theme.Dialog.AppError" parent="Theme.Holo.Dialog">
<item name="windowFrame">@null</item>
@@ -947,13 +966,17 @@ please see themes_device_defaults.xml.
<item name="toastFrameBackground">@android:drawable/toast_frame_holo</item>
<!-- Panel attributes -->
- <item name="panelBackground">@android:drawable/menu_background</item>
+ <item name="panelBackground">@android:drawable/menu_dropdown_panel_holo_dark</item>
<item name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>
<!-- These three attributes do not seems to be used by the framework. Declared public though -->
<item name="panelColorBackground">#000</item>
<item name="panelColorForeground">?android:attr/textColorPrimary</item>
<item name="panelTextAppearance">?android:attr/textAppearance</item>
+ <item name="panelMenuIsCompact">true</item>
+ <item name="panelMenuListWidth">250dip</item>
+ <item name="panelMenuListTheme">@android:style/Theme.Holo.CompactMenu</item>
+
<!-- Scrollbar attributes -->
<item name="scrollbarFadeDuration">250</item>
<item name="scrollbarDefaultDelayBeforeFade">300</item>
@@ -1244,13 +1267,17 @@ please see themes_device_defaults.xml.
<item name="toastFrameBackground">@android:drawable/toast_frame_holo</item>
<!-- Panel attributes -->
- <item name="panelBackground">@android:drawable/menu_background</item>
+ <item name="panelBackground">@android:drawable/menu_dropdown_panel_holo_light</item>
<item name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>
<!-- These three attributes do not seems to be used by the framework. Declared public though -->
<item name="panelColorBackground">#000</item>
<item name="panelColorForeground">?android:attr/textColorPrimary</item>
<item name="panelTextAppearance">?android:attr/textAppearance</item>
+ <item name="panelMenuIsCompact">true</item>
+ <item name="panelMenuListWidth">250dip</item>
+ <item name="panelMenuListTheme">@android:style/Theme.Holo.Light.CompactMenu</item>
+
<!-- Scrollbar attributes -->
<item name="scrollbarFadeDuration">250</item>
<item name="scrollbarDefaultDelayBeforeFade">300</item>