From 7e06ea80f781b26e17d630ccbb08237be2541f36 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Sun, 5 Dec 2010 18:22:52 -0800 Subject: Fix bug 3245210 - Bad window style for action modes for light holo dialog theme Also fixed some issues with the overlay action mode window styles. Change-Id: Ie4cf43f6ccf720ef0090ca8bd667fb6d78152f93 --- core/java/android/preference/DialogPreference.java | 3 +-- core/res/res/values/attrs.xml | 3 +++ core/res/res/values/styles.xml | 24 ++++++++++++++++++++-- core/res/res/values/themes.xml | 7 +++++++ .../android/internal/policy/impl/PhoneWindow.java | 3 ++- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/core/java/android/preference/DialogPreference.java b/core/java/android/preference/DialogPreference.java index 45c8174d2ca5..73427d2cc5aa 100644 --- a/core/java/android/preference/DialogPreference.java +++ b/core/java/android/preference/DialogPreference.java @@ -338,8 +338,7 @@ public abstract class DialogPreference extends Preference implements return null; } - LayoutInflater inflater = (LayoutInflater) getContext().getSystemService( - Context.LAYOUT_INFLATER_SERVICE); + LayoutInflater inflater = LayoutInflater.from(mBuilder.getContext()); return inflater.inflate(mDialogLayoutResId, null); } diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 4d35b948b765..204e5ddc8cce 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -548,6 +548,9 @@ + + + diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index ae685f8d3fd7..d677aa504a0f 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -204,6 +204,12 @@ + + + + + + + diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index a44e8d4845c7..60598f0b64c7 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -257,6 +257,7 @@ @style/Widget.ActionButton.CloseMode @android:style/Widget.ActionBar 56dip + ?android:attr/popupWindowStyle @drawable/divider_vertical_dark @drawable/divider_vertical_dark @@ -899,6 +900,7 @@ @style/Widget.Holo.ActionButton.CloseMode @android:style/Widget.Holo.ActionBar 56dip + @android:style/Widget.Holo.PopupWindow.ActionMode ?android:attr/listDivider ?android:attr/listDivider @@ -988,6 +990,7 @@ @android:drawable/group_button_background_holo_light @android:drawable/item_background_holo_light + @android:style/Widget.Holo.Light.Button.Borderless @android:drawable/ic_ab_back_holo_light @@ -1145,6 +1148,7 @@ @style/Widget.Holo.Light.ActionButton.CloseMode @android:style/Widget.Holo.Light.ActionBar 56dip + @android:style/Widget.Holo.Light.PopupWindow.ActionMode ?android:attr/listDivider ?android:attr/listDivider @@ -1212,6 +1216,7 @@ @null + @android:style/Widget.Holo.ButtonGroup.AlertDialog ?android:attr/selectableItemBackground @android:style/TextAppearance.Holo @@ -1278,9 +1283,11 @@ @android:style/Animation.Holo.Dialog stateUnspecified|adjustPan false + true @null + @android:style/Widget.Holo.Light.ButtonGroup.AlertDialog ?android:attr/selectableItemBackground @android:style/TextAppearance.Holo.Light diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index b487d92a47e0..5faece79f13a 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -1881,7 +1881,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (mActionModeView == null) { if (hasFeature(FEATURE_ACTION_MODE_OVERLAY)) { mActionModeView = new ActionBarContextView(mContext); - mActionModePopup = new PopupWindow(mContext); + mActionModePopup = new PopupWindow(mContext, null, + com.android.internal.R.attr.actionModePopupWindowStyle); mActionModePopup.setLayoutInScreenEnabled(true); mActionModePopup.setClippingEnabled(false); mActionModePopup.setContentView(mActionModeView); -- cgit v1.2.3-59-g8ed1b