Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3808b5d authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 3058324

PopupWindow now responds to the style attribute popupAnimationStyle
instead of windowAnimationStyle. The latter was being overridden with
undesired values. Animation.PopupWindow style added as a special
default sentinel value, which switches animation styles based on
whether the window is showing above or below an anchor.

Change-Id: Id7cc81f089b6053f2d3a495b1046002548ecf125
parent 4fc04f16
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -5806,17 +5806,6 @@
 visibility="public"
>
</field>
<field name="kraken_resource_pad56"
 type="int"
 transient="false"
 volatile="false"
 value="16843465"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="kraken_resource_pad6"
 type="int"
 transient="false"
@@ -7170,6 +7159,17 @@
 visibility="public"
>
</field>
<field name="popupAnimationStyle"
 type="int"
 transient="false"
 volatile="false"
 value="16843465"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="popupBackground"
 type="int"
 transient="false"
@@ -79217,7 +79217,7 @@
 type="float"
 transient="false"
 volatile="false"
 value="0.001f"
 value="0.0010f"
 static="true"
 final="true"
 deprecated="not deprecated"
@@ -225166,7 +225166,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="arg0" type="T">
<parameter name="t" type="T">
</parameter>
</method>
</interface>
+4 −1
Original line number Diff line number Diff line
@@ -167,7 +167,10 @@ public class PopupWindow {
                attrs, com.android.internal.R.styleable.PopupWindow, defStyle, 0);

        mBackground = a.getDrawable(R.styleable.PopupWindow_popupBackground);
        mAnimationStyle = a.getResourceId(R.styleable.PopupWindow_windowAnimationStyle, -1);

        final int animStyle = a.getResourceId(R.styleable.PopupWindow_popupAnimationStyle, -1);
        mAnimationStyle = animStyle == com.android.internal.R.style.Animation_PopupWindow ? -1 :
                animStyle;

        // If this is a StateListDrawable, try to find and store the drawable to be
        // used when the drop-down is placed above its anchor view, and the one to be
+1 −1
Original line number Diff line number Diff line
@@ -2239,7 +2239,7 @@
    </declare-styleable>
    <declare-styleable name="PopupWindow">
        <attr name="popupBackground" format="reference|color" />
        <attr name="windowAnimationStyle" />
        <attr name="popupAnimationStyle" format="reference" />
    </declare-styleable>
    <declare-styleable name="ViewAnimator">
        <attr name="inAnimation" format="reference" />
+1 −0
Original line number Diff line number Diff line
@@ -1259,6 +1259,7 @@
  <public type="attr" name="textSelectHandleRight" id="0x010102c6" />
  <public type="attr" name="textSelectHandle" id="0x010102c7" />
  <public type="attr" name="textSelectHandleWindowStyle" id="0x010102c8" />
  <public type="attr" name="popupAnimationStyle" id="0x010102c9" />

  <public-padding type="attr" name="kraken_resource_pad" end="0x01010300" />
  
+5 −1
Original line number Diff line number Diff line
@@ -185,6 +185,9 @@
        <item name="windowExitAnimation">@anim/fade_out</item>
    </style>

    <!-- A special animation value used internally for popup windows. -->
    <style name="Animation.PopupWindow" />

    <!-- Status Bar Styles -->

    <style name="TextAppearance.StatusBar">
@@ -550,6 +553,7 @@
    
    <style name="Widget.PopupWindow">
        <item name="android:popupBackground">@android:drawable/editbox_dropdown_background_dark</item>
        <item name="android:popupAnimationStyle">@android:style/Animation.PopupWindow</item>
    </style>

    <style name="Widget.KeyboardView" parent="android:Widget">
@@ -863,7 +867,7 @@

    <!-- Style for the small popup windows that contain text selection anchors. -->
    <style name="Widget.TextSelectHandle">
        <item name="android:windowAnimationStyle">@android:style/Animation.TextSelectHandle</item>
        <item name="android:popupAnimationStyle">@android:style/Animation.TextSelectHandle</item>
    </style>

    <!-- Style for animating text selection handles. -->