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

Commit 6a5fc4bc authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "New TimeInterpolator interface for android.animation package."

parents 786c5715 e0ee2e9f
Loading
Loading
Loading
Loading
+31 −21
Original line number Diff line number Diff line
@@ -20328,7 +20328,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="value" type="android.view.animation.Interpolator">
<parameter name="value" type="android.animation.TimeInterpolator">
</parameter>
</method>
<method name="setStartDelay"
@@ -20678,7 +20678,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="interpolator" type="android.view.animation.Interpolator">
<parameter name="interpolator" type="android.animation.TimeInterpolator">
</parameter>
</method>
<method name="setStartDelay"
@@ -20981,7 +20981,7 @@
>
</method>
<method name="getInterpolator"
 return="android.view.animation.Interpolator"
 return="android.animation.TimeInterpolator"
 abstract="false"
 native="false"
 synchronized="false"
@@ -21036,7 +21036,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="interpolator" type="android.view.animation.Interpolator">
<parameter name="interpolator" type="android.animation.TimeInterpolator">
</parameter>
</method>
<method name="setValue"
@@ -21124,7 +21124,7 @@
</parameter>
</method>
<method name="getInterpolator"
 return="android.view.animation.Interpolator"
 return="android.animation.TimeInterpolator"
 abstract="false"
 native="false"
 synchronized="false"
@@ -21271,7 +21271,7 @@
>
<parameter name="transitionType" type="int">
</parameter>
<parameter name="interpolator" type="android.view.animation.Interpolator">
<parameter name="interpolator" type="android.animation.TimeInterpolator">
</parameter>
</method>
<method name="setStagger"
@@ -21670,6 +21670,27 @@
</parameter>
</method>
</class>
<interface name="TimeInterpolator"
 abstract="true"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<method name="getInterpolation"
 return="float"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="input" type="float">
</parameter>
</method>
</interface>
<interface name="TypeEvaluator"
 abstract="true"
 static="false"
@@ -21794,7 +21815,7 @@
>
</method>
<method name="getInterpolator"
 return="android.view.animation.Interpolator"
 return="android.animation.TimeInterpolator"
 abstract="false"
 native="false"
 synchronized="false"
@@ -21956,7 +21977,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="value" type="android.view.animation.Interpolator">
<parameter name="value" type="android.animation.TimeInterpolator">
</parameter>
</method>
<method name="setRepeatCount"
@@ -212417,19 +212438,8 @@
 deprecated="not deprecated"
 visibility="public"
>
<method name="getInterpolation"
 return="float"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="input" type="float">
</parameter>
</method>
<implements name="android.animation.TimeInterpolator">
</implements>
</interface>
<class name="LayoutAnimationController"
 extends="java.lang.Object"
+1 −3
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.animation;

import android.view.animation.Interpolator;

import java.util.ArrayList;

/**
@@ -97,7 +95,7 @@ public abstract class Animator implements Cloneable {
     *
     * @param value the interpolator to be used by this animation
     */
    public abstract void setInterpolator(Interpolator value);
    public abstract void setInterpolator(TimeInterpolator value);

    /**
     * Returns whether this Animator is currently running (having been started and not yet ended).
+2 −4
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.animation;

import android.view.animation.Interpolator;

import java.util.ArrayList;
import java.util.HashMap;

@@ -173,13 +171,13 @@ public final class AnimatorSet extends Animator {
    }

    /**
     * Sets the Interpolator for all current {@link #getChildAnimations() child animations}
     * Sets the TimeInterpolator for all current {@link #getChildAnimations() child animations}
     * of this AnimatorSet.
     *
     * @param interpolator the interpolator to be used by each child animation of this AnimatorSet
     */
    @Override
    public void setInterpolator(Interpolator interpolator) {
    public void setInterpolator(TimeInterpolator interpolator) {
        for (Node node : mNodes) {
            node.animation.setInterpolator(interpolator);
        }
+4 −6
Original line number Diff line number Diff line
@@ -16,14 +16,12 @@

package android.animation;

import android.view.animation.Interpolator;

/**
 * This class holds a time/value pair for an animation. The Keyframe class is used
 * by {@link ValueAnimator} to define the values that the animation target will have over the course
 * of the animation. As the time proceeds from one keyframe to the other, the value of the
 * target object will animate between the value at the previous keyframe and the value at the
 * next keyframe. Each keyframe also holds an option {@link android.view.animation.Interpolator}
 * next keyframe. Each keyframe also holds an optional {@link TimeInterpolator}
 * object, which defines the time interpolation over the intervalue preceding the keyframe.
 */
public class Keyframe implements Cloneable {
@@ -47,7 +45,7 @@ public class Keyframe implements Cloneable {
     * The optional time interpolator for the interval preceding this keyframe. A null interpolator
     * (the default) results in linear interpolation over the interval.
     */
    private Interpolator mInterpolator = null;
    private TimeInterpolator mInterpolator = null;

    /**
     * Private constructor, called from the public constructors with the additional
@@ -224,7 +222,7 @@ public class Keyframe implements Cloneable {
     *
     * @return The optional interpolator for this Keyframe.
     */
    public Interpolator getInterpolator() {
    public TimeInterpolator getInterpolator() {
        return mInterpolator;
    }

@@ -234,7 +232,7 @@ public class Keyframe implements Cloneable {
     *
     * @return The optional interpolator for this Keyframe.
     */
    public void setInterpolator(Interpolator interpolator) {
    public void setInterpolator(TimeInterpolator interpolator) {
        mInterpolator = interpolator;
    }

+3 −5
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package android.animation;

import java.util.ArrayList;

import android.view.animation.Interpolator;

/**
 * This class holds a collection of Keyframe objects and is called by ValueAnimator to calculate
 * values between those keyframes for a given animation. The class internal to the animation
@@ -58,7 +56,7 @@ class KeyframeSet {
        if (fraction <= 0f) {
            final Keyframe prevKeyframe = mKeyframes.get(0);
            final Keyframe nextKeyframe = mKeyframes.get(1);
            final Interpolator interpolator = nextKeyframe.getInterpolator();
            final TimeInterpolator interpolator = nextKeyframe.getInterpolator();
            if (interpolator != null) {
                fraction = interpolator.getInterpolation(fraction);
            }
@@ -69,7 +67,7 @@ class KeyframeSet {
        } else if (fraction >= 1f) {
            final Keyframe prevKeyframe = mKeyframes.get(mNumKeyframes - 2);
            final Keyframe nextKeyframe = mKeyframes.get(mNumKeyframes - 1);
            final Interpolator interpolator = nextKeyframe.getInterpolator();
            final TimeInterpolator interpolator = nextKeyframe.getInterpolator();
            if (interpolator != null) {
                fraction = interpolator.getInterpolation(fraction);
            }
@@ -82,7 +80,7 @@ class KeyframeSet {
        for (int i = 1; i < mNumKeyframes; ++i) {
            Keyframe nextKeyframe = mKeyframes.get(i);
            if (fraction < nextKeyframe.getFraction()) {
                final Interpolator interpolator = nextKeyframe.getInterpolator();
                final TimeInterpolator interpolator = nextKeyframe.getInterpolator();
                if (interpolator != null) {
                    fraction = interpolator.getInterpolation(fraction);
                }
Loading