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

Commit cbf9cb35 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #3400119: API to specify a black background behind a window transition"

parents 37b05d7d de75cb47
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -233470,6 +233470,17 @@
 visibility="protected"
>
</method>
<method name="getBackgroundColor"
 return="int"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getDetachWallpaper"
 return="boolean"
 abstract="false"
@@ -233755,6 +233766,19 @@
<parameter name="listener" type="android.view.animation.Animation.AnimationListener">
</parameter>
</method>
<method name="setBackgroundColor"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="bg" type="int">
</parameter>
</method>
<method name="setDetachWallpaper"
 return="void"
 abstract="false"
@@ -266669,7 +266693,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="t" type="T">
<parameter name="arg0" type="T">
</parameter>
</method>
</interface>
+24 −0
Original line number Diff line number Diff line
@@ -180,6 +180,11 @@ public abstract class Animation implements Cloneable {
     */
    private int mZAdjustment;

    /**
     * Desired background color behind animation.
     */
    private int mBackgroundColor;

    /**
     * scalefactor to apply to pivot points, etc. during animation. Subclasses retrieve the
     * value via getScaleFactor().
@@ -236,6 +241,8 @@ public abstract class Animation implements Cloneable {

        setZAdjustment(a.getInt(com.android.internal.R.styleable.Animation_zAdjustment, ZORDER_NORMAL));
        
        setBackgroundColor(a.getInt(com.android.internal.R.styleable.Animation_background, 0));

        setDetachWallpaper(a.getBoolean(com.android.internal.R.styleable.Animation_detachWallpaper, false));
        
        ensureInterpolator();
@@ -567,6 +574,16 @@ public abstract class Animation implements Cloneable {
        mZAdjustment = zAdjustment;
    }
    
    /**
     * Set background behind animation.
     *
     * @param bg The background color.  If 0, no background.  Currently must
     * be black, with any desired alpha level.
     */
    public void setBackgroundColor(int bg) {
        mBackgroundColor = bg;
    }

    /**
     * The scale factor is set by the call to <code>getTransformation</code>. Overrides of 
     * {@link #getTransformation(long, Transformation, float)} will get this value
@@ -689,6 +706,13 @@ public abstract class Animation implements Cloneable {
        return mZAdjustment;
    }

    /**
     * Returns the background color behind the animation.
     */
    public int getBackgroundColor() {
        return mBackgroundColor;
    }

    /**
     * Return value of {@link #setDetachWallpaper(boolean)}.
     * @attr ref android.R.styleable#Animation_detachWallpaper
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
-->

<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:detachWallpaper="true" android:shareInterpolator="false">
        android:background="#ff000000" android:shareInterpolator="false">
    <scale 	android:fromXScale="1.0" android:toXScale="1.0"
            android:fromYScale="0.95" android:toYScale="1.0"
            android:pivotX="50%p" android:pivotY="50%p"
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
-->

<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:detachWallpaper="true" android:shareInterpolator="false">
        android:background="#ff000000" android:shareInterpolator="false">
    <scale android:fromXScale="1.0" android:toXScale="1.0"
            android:fromYScale="1.0" android:toYScale="0.0"
            android:pivotX="50%p" android:pivotY="50%p"
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
-->

<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:detachWallpaper="true" android:shareInterpolator="false">
        android:background="#ff000000" android:shareInterpolator="false">
    <scale android:fromXScale="1.0" android:toXScale="1.0"
            android:fromYScale=".9" android:toYScale="1.0"
            android:pivotX="50%p" android:pivotY="50%p"
Loading