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

Commit 21cd1389 authored by Chet Haase's avatar Chet Haase
Browse files

Add transition effects for layout changes on ViewGroups

Change-Id: Ibefcca5692450188fbcec608f3f7e36be1213b21
parent b062f02d
Loading
Loading
Loading
Loading
+685 −17
Original line number Diff line number Diff line
@@ -19851,8 +19851,6 @@
 deprecated="not deprecated"
 visibility="public"
>
<exception name="CloneNotSupportedException" type="java.lang.CloneNotSupportedException">
</exception>
</method>
<method name="end"
 return="void"
@@ -19865,6 +19863,17 @@
 visibility="public"
>
</method>
<method name="getDuration"
 return="long"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getListeners"
 return="java.util.ArrayList&lt;android.animation.Animatable.AnimatableListener&gt;"
 abstract="false"
@@ -19876,6 +19885,17 @@
 visibility="public"
>
</method>
<method name="getStartDelay"
 return="long"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="isRunning"
 return="boolean"
 abstract="true"
@@ -19911,6 +19931,80 @@
<parameter name="listener" type="android.animation.Animatable.AnimatableListener">
</parameter>
</method>
<method name="setDuration"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="duration" type="long">
</parameter>
</method>
<method name="setInterpolator"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="value" type="android.view.animation.Interpolator">
</parameter>
</method>
<method name="setStartDelay"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="startDelay" type="long">
</parameter>
</method>
<method name="setTarget"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="target" type="java.lang.Object">
</parameter>
</method>
<method name="setupEndValues"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="setupStartValues"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="start"
 return="void"
 abstract="false"
@@ -20230,6 +20324,17 @@
 visibility="public"
>
</method>
<method name="getValues"
 return="android.animation.PropertyValuesHolder[]"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="isRunning"
 return="boolean"
 abstract="false"
@@ -20566,6 +20671,8 @@
 deprecated="not deprecated"
 visibility="public"
>
<implements name="java.lang.Cloneable">
</implements>
<constructor name="Keyframe"
 type="android.animation.Keyframe"
 static="false"
@@ -20587,6 +20694,42 @@
>
<parameter name="fraction" type="float">
</parameter>
<parameter name="value" type="java.lang.Float">
</parameter>
</constructor>
<constructor name="Keyframe"
 type="android.animation.Keyframe"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="fraction" type="float">
</parameter>
<parameter name="value" type="java.lang.Integer">
</parameter>
</constructor>
<constructor name="Keyframe"
 type="android.animation.Keyframe"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="fraction" type="float">
</parameter>
<parameter name="value" type="java.lang.Double">
</parameter>
</constructor>
<constructor name="Keyframe"
 type="android.animation.Keyframe"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="fraction" type="float">
</parameter>
<parameter name="value" type="int">
</parameter>
</constructor>
@@ -20614,6 +20757,17 @@
<parameter name="value" type="double">
</parameter>
</constructor>
<method name="clone"
 return="android.animation.Keyframe"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getFraction"
 return="float"
 abstract="false"
@@ -20698,6 +20852,333 @@
</parameter>
</method>
</class>
<class name="LayoutTransition"
 extends="java.lang.Object"
 abstract="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<constructor name="LayoutTransition"
 type="android.animation.LayoutTransition"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</constructor>
<method name="addTransitionListener"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="listener" type="android.animation.LayoutTransition.TransitionListener">
</parameter>
</method>
<method name="childAdd"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="parent" type="android.view.ViewGroup">
</parameter>
<parameter name="child" type="android.view.View">
</parameter>
</method>
<method name="childRemove"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="parent" type="android.view.ViewGroup">
</parameter>
<parameter name="child" type="android.view.View">
</parameter>
</method>
<method name="getAnimatable"
 return="android.animation.Animatable"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
</method>
<method name="getDuration"
 return="long"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
</method>
<method name="getInterpolator"
 return="android.view.animation.Interpolator"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
</method>
<method name="getStagger"
 return="long"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
</method>
<method name="getStartDelay"
 return="long"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
</method>
<method name="getTransitionListeners"
 return="java.util.List&lt;android.animation.LayoutTransition.TransitionListener&gt;"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="removeTransitionListener"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="listener" type="android.animation.LayoutTransition.TransitionListener">
</parameter>
</method>
<method name="setAnimatable"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
<parameter name="animatable" type="android.animation.Animatable">
</parameter>
</method>
<method name="setDuration"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="duration" type="long">
</parameter>
</method>
<method name="setDuration"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
<parameter name="duration" type="long">
</parameter>
</method>
<method name="setInterpolator"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
<parameter name="interpolator" type="android.view.animation.Interpolator">
</parameter>
</method>
<method name="setStagger"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
<parameter name="duration" type="long">
</parameter>
</method>
<method name="setStartDelay"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transitionType" type="int">
</parameter>
<parameter name="delay" type="long">
</parameter>
</method>
<field name="APPEARING"
 type="int"
 transient="false"
 volatile="false"
 value="2"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="CHANGE_APPEARING"
 type="int"
 transient="false"
 volatile="false"
 value="0"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="CHANGE_DISAPPEARING"
 type="int"
 transient="false"
 volatile="false"
 value="1"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="DISAPPEARING"
 type="int"
 transient="false"
 volatile="false"
 value="3"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
</class>
<interface name="LayoutTransition.TransitionListener"
 abstract="true"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<method name="endTransition"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transition" type="android.animation.LayoutTransition">
</parameter>
<parameter name="container" type="android.view.ViewGroup">
</parameter>
<parameter name="view" type="android.view.View">
</parameter>
<parameter name="transitionType" type="int">
</parameter>
</method>
<method name="startTransition"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transition" type="android.animation.LayoutTransition">
</parameter>
<parameter name="container" type="android.view.ViewGroup">
</parameter>
<parameter name="view" type="android.view.View">
</parameter>
<parameter name="transitionType" type="int">
</parameter>
</method>
</interface>
<class name="PropertyAnimator"
 extends="android.animation.Animator"
 abstract="false"
@@ -20779,19 +21260,6 @@
<parameter name="propertyName" type="java.lang.String">
</parameter>
</method>
<method name="setTarget"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="target" type="java.lang.Object">
</parameter>
</method>
</class>
<class name="PropertyValuesHolder"
 extends="java.lang.Object"
@@ -20801,6 +21269,8 @@
 deprecated="not deprecated"
 visibility="public"
>
<implements name="java.lang.Cloneable">
</implements>
<constructor name="PropertyValuesHolder"
 type="android.animation.PropertyValuesHolder"
 static="false"
@@ -20823,6 +21293,17 @@
<parameter name="values" type="T...">
</parameter>
</constructor>
<method name="clone"
 return="android.animation.PropertyValuesHolder"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getGetter"
 return="java.lang.reflect.Method"
 abstract="false"
@@ -20985,6 +21466,28 @@
 visibility="public"
>
</method>
<method name="getDuration"
 return="long"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getStartDelay"
 return="long"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="isRunning"
 return="boolean"
 abstract="false"
@@ -21035,7 +21538,7 @@
<parameter name="sequenceItems" type="android.animation.Animatable...">
</parameter>
</method>
<method name="setTarget"
<method name="setDuration"
 return="void"
 abstract="false"
 native="false"
@@ -21045,7 +21548,33 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="target" type="java.lang.Object">
<parameter name="duration" type="long">
</parameter>
</method>
<method name="setInterpolator"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="interpolator" type="android.view.animation.Interpolator">
</parameter>
</method>
<method name="setStartDelay"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="startDelay" type="long">
</parameter>
</method>
</class>
@@ -194495,6 +195024,19 @@
<parameter name="focusableMode" type="int">
</parameter>
</method>
<method name="addOnLayoutChangeListener"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="listener" type="android.view.View.OnLayoutChangeListener">
</parameter>
</method>
<method name="addTouchables"
 return="void"
 abstract="false"
@@ -195584,6 +196126,17 @@
 visibility="public"
>
</method>
<method name="getOnLayoutChangeListeners"
 return="java.util.List&lt;android.view.View.OnLayoutChangeListener&gt;"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getPaddingBottom"
 return="int"
 abstract="false"
@@ -197188,6 +197741,19 @@
<parameter name="action" type="java.lang.Runnable">
</parameter>
</method>
<method name="removeOnLayoutChangeListener"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="listener" type="android.view.View.OnLayoutChangeListener">
</parameter>
</method>
<method name="requestFocus"
 return="boolean"
 abstract="false"
@@ -197456,6 +198022,19 @@
<parameter name="resid" type="int">
</parameter>
</method>
<method name="setBottom"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="bottom" type="int">
</parameter>
</method>
<method name="setClickable"
 return="void"
 abstract="false"
@@ -197664,6 +198243,19 @@
<parameter name="params" type="android.view.ViewGroup.LayoutParams">
</parameter>
</method>
<method name="setLeft"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="left" type="int">
</parameter>
</method>
<method name="setLongClickable"
 return="void"
 abstract="false"
@@ -197906,6 +198498,19 @@
<parameter name="pressed" type="boolean">
</parameter>
</method>
<method name="setRight"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="right" type="int">
</parameter>
</method>
<method name="setRotation"
 return="void"
 abstract="false"
@@ -198090,6 +198695,19 @@
<parameter name="tag" type="java.lang.Object">
</parameter>
</method>
<method name="setTop"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="top" type="int">
</parameter>
</method>
<method name="setTouchDelegate"
 return="void"
 abstract="false"
@@ -199152,6 +199770,43 @@
</parameter>
</method>
</interface>
<interface name="View.OnLayoutChangeListener"
 abstract="true"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<method name="onLayoutChange"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="v" type="android.view.View">
</parameter>
<parameter name="left" type="int">
</parameter>
<parameter name="top" type="int">
</parameter>
<parameter name="right" type="int">
</parameter>
<parameter name="bottom" type="int">
</parameter>
<parameter name="oldLeft" type="int">
</parameter>
<parameter name="oldTop" type="int">
</parameter>
<parameter name="oldRight" type="int">
</parameter>
<parameter name="oldBottom" type="int">
</parameter>
</method>
</interface>
<interface name="View.OnLongClickListener"
 abstract="true"
 static="true"
@@ -200980,6 +201635,19 @@
<parameter name="animationListener" type="android.view.animation.Animation.AnimationListener">
</parameter>
</method>
<method name="setLayoutTransition"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="transition" type="android.animation.LayoutTransition">
</parameter>
</method>
<method name="setMotionEventSplittingEnabled"
 return="void"
 abstract="false"
+90 −9
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.animation;

import android.view.animation.Interpolator;

import java.util.ArrayList;

/**
@@ -56,6 +58,46 @@ public abstract class Animatable implements Cloneable {
    public void end() {
    }

    /**
     * The amount of time, in milliseconds, to delay starting the animation after
     * {@link #start()} is called.
     *
     * @return the number of milliseconds to delay running the animation
     */
    public abstract long getStartDelay();

    /**
     * The amount of time, in milliseconds, to delay starting the animation after
     * {@link #start()} is called.

     * @param startDelay The amount of the delay, in milliseconds
     */
    public abstract void setStartDelay(long startDelay);


    /**
     * Sets the length of the animation.
     *
     * @param duration The length of the animation, in milliseconds.
     */
    public abstract void setDuration(long duration);

    /**
     * Gets the length of the animation.
     *
     * @return The length of the animation, in milliseconds.
     */
    public abstract long getDuration();

    /**
     * The time interpolator used in calculating the elapsed fraction of this animation. The
     * interpolator determines whether the animation runs with linear or non-linear motion,
     * such as acceleration and deceleration. The default value is
     * {@link android.view.animation.AccelerateDecelerateInterpolator}
     *
     * @param value the interpolator to be used by this animation
     */
    public abstract void setInterpolator(Interpolator value);

    /**
     * Returns whether this Animatable is currently running (having been started and not yet ended).
@@ -115,7 +157,8 @@ public abstract class Animatable implements Cloneable {
    }

    @Override
    public Animatable clone() throws CloneNotSupportedException {
    public Animatable clone() {
        try {
            final Animatable anim = (Animatable) super.clone();
            if (mListeners != null) {
                ArrayList<AnimatableListener> oldListeners = mListeners;
@@ -126,6 +169,44 @@ public abstract class Animatable implements Cloneable {
                }
            }
            return anim;
        } catch (CloneNotSupportedException e) {
           throw new AssertionError();
        }
    }

    /**
     * This method tells the object to use appropriate information to extract
     * starting values for the animation. For example, a Sequencer object will pass
     * this call to its child objects to tell them to set up the values. A
     * PropertyAnimator object will use the information it has about its target object
     * and PropertyValuesHolder objects to get the start values for its properties.
     * An Animator object will ignore the request since it does not have enough
     * information (such as a target object) to gather these values.
     */
    public void setupStartValues() {
    }

    /**
     * This method tells the object to use appropriate information to extract
     * ending values for the animation. For example, a Sequencer object will pass
     * this call to its child objects to tell them to set up the values. A
     * PropertyAnimator object will use the information it has about its target object
     * and PropertyValuesHolder objects to get the start values for its properties.
     * An Animator object will ignore the request since it does not have enough
     * information (such as a target object) to gather these values.
     */
    public void setupEndValues() {
    }

    /**
     * Sets the target object whose property will be animated by this animation. Not all subclasses
     * operate on target objects (for example, {@link android.animation.Animator}, but this method
     * is on the superclass for the convenience of dealing generically with those subclasses
     * that do handle targets.
     *
     * @param target The object being animated
     */
    public void setTarget(Object target) {
    }

    /**
+4 −4
Original line number Diff line number Diff line
@@ -26,28 +26,28 @@ import android.animation.Animatable.AnimatableListener;
public abstract class AnimatableListenerAdapter implements AnimatableListener {

    /**
     * @{inheritdoc}
     * {@inheritdoc}
     */
    @Override
    public void onAnimationCancel(Animatable animation) {
    }

    /**
     * @{inheritdoc}
     * {@inheritdoc}
     */
    @Override
    public void onAnimationEnd(Animatable animation) {
    }

    /**
     * @{inheritdoc}
     * {@inheritdoc}
     */
    @Override
    public void onAnimationRepeat(Animatable animation) {
    }

    /**
     * @{inheritdoc}
     * {@inheritdoc}
     */
    @Override
    public void onAnimationStart(Animatable animation) {
+37 −12

File changed.

Preview size limit exceeded, changes collapsed.

+57 −2

File changed.

Preview size limit exceeded, changes collapsed.

Loading