Make overlapAnchor public, make ActionBar spinner overlap
BUG: 15566102
Change-Id: I23885c2d66ce0749e4c131491205bb8eb2612923
diff --git a/api/current.txt b/api/current.txt
index 1973da5..032ae3b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -859,6 +859,7 @@
field public static final int overScrollFooter = 16843459; // 0x10102c3
field public static final int overScrollHeader = 16843458; // 0x10102c2
field public static final int overScrollMode = 16843457; // 0x10102c1
+ field public static final int overlapAnchor = 16843876; // 0x1010464
field public static final int overridesImplicitlyEnabledSubtype = 16843682; // 0x10103a2
field public static final int packageNames = 16843649; // 0x1010381
field public static final int padding = 16842965; // 0x10100d5
diff --git a/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java b/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
index b298d85..5c2e805 100644
--- a/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
+++ b/core/java/com/android/internal/widget/ToolbarWidgetWrapper.java
@@ -480,7 +480,7 @@
private void ensureSpinner() {
if (mSpinner == null) {
- mSpinner = new Spinner(getContext());
+ mSpinner = new Spinner(getContext(), null, R.attr.actionDropDownStyle);
Toolbar.LayoutParams lp = new Toolbar.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.START | Gravity.CENTER_VERTICAL);
mSpinner.setLayoutParams(lp);
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 90162f4..ab0b67d 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -3870,8 +3870,11 @@
<attr name="inputType" />
</declare-styleable>
<declare-styleable name="PopupWindow">
+ <!-- The background to use for the popup window. -->
<attr name="popupBackground" format="reference|color" />
+ <!-- The animation style to use for the popup window. -->
<attr name="popupAnimationStyle" format="reference" />
+ <!-- Whether the popup window should overlap its anchor view. -->
<attr name="overlapAnchor" format="boolean" />
</declare-styleable>
<declare-styleable name="ViewAnimator">
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 0ea8cf4..de07184 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2189,6 +2189,7 @@
<public type="attr" name="searchKeyphrase" />
<public type="attr" name="searchKeyphraseSupportedLocales" />
<public type="attr" name="windowTransitionBackgroundFadeDuration" />
+ <public type="attr" name="overlapAnchor" />
<public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index a40835c..659b477 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -625,6 +625,7 @@
<style name="Widget.Material.Spinner.DropDown.ActionBar">
<item name="background">@drawable/spinner_background_material</item>
+ <item name="overlapAnchor">true</item>
</style>
<style name="Widget.Material.TabWidget" parent="Widget.TabWidget">