summaryrefslogtreecommitdiffstats
path: root/core/java/android/animation/Keyframe.java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-10-07 09:06:18 -0700
committerChet Haase <chet@google.com>2010-10-07 12:27:06 -0700
commite0ee2e9f3102c3c14c873a75a7b04e49787e0fb9 (patch)
tree2d1bc01eea7bed48b20ec89f7b2ed1fdd8521054 /core/java/android/animation/Keyframe.java
parentd5df1e5cfcc9e446626692cec72f53e3024fa455 (diff)
downloadframeworks_base-e0ee2e9f3102c3c14c873a75a7b04e49787e0fb9.zip
frameworks_base-e0ee2e9f3102c3c14c873a75a7b04e49787e0fb9.tar.gz
frameworks_base-e0ee2e9f3102c3c14c873a75a7b04e49787e0fb9.tar.bz2
New TimeInterpolator interface for android.animation package.
The new animation package's reliance on the old Interpolator interface (in android.view.animation) was an eyesore. Adding TimeInterpolator, and having the old Interpolator interface extend it, allows the new Animator classes to break the tie to the older animation package completely. However, developers can still use the older Interpolator-based classes, such as AccelerateInterpolator, because they all implicitly extend the new TimeInterpolator class. Change-Id: I41132fa56167ba564f4839113289114d0ea31a92
Diffstat (limited to 'core/java/android/animation/Keyframe.java')
-rw-r--r--core/java/android/animation/Keyframe.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/java/android/animation/Keyframe.java b/core/java/android/animation/Keyframe.java
index 192ba5c..f9a4f3c 100644
--- a/core/java/android/animation/Keyframe.java
+++ b/core/java/android/animation/Keyframe.java
@@ -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;
}