From a33de55404eb2133d1bae2add3f6e8708459f56d Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Fri, 3 Feb 2012 16:28:24 -0800 Subject: [PATCH] Make the TimeAnimator class public. This class has existed since ICS, but was hidden. This change just makes it public API. Also, cleaned up some internal javadocs. Change-Id: Id69408446ced183e01d2b065a67397eb305d9665 --- api/current.txt | 9 ++++++++ core/java/android/animation/TimeAnimator.java | 23 +++++++++---------- core/java/android/view/View.java | 6 ++--- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/api/current.txt b/api/current.txt index 37b032866e49d..574af6b9f55d6 100644 --- a/api/current.txt +++ b/api/current.txt @@ -2349,6 +2349,15 @@ package android.animation { method public void setPropertyName(java.lang.String); } + public class TimeAnimator extends android.animation.ValueAnimator { + ctor public TimeAnimator(); + method public void setTimeListener(android.animation.TimeAnimator.TimeListener); + } + + public static abstract interface TimeAnimator.TimeListener { + method public abstract void onTimeUpdate(android.animation.TimeAnimator, long, long); + } + public abstract interface TimeInterpolator { method public abstract float getInterpolation(float); } diff --git a/core/java/android/animation/TimeAnimator.java b/core/java/android/animation/TimeAnimator.java index 0a96d592b3e68..a79f2a3093268 100644 --- a/core/java/android/animation/TimeAnimator.java +++ b/core/java/android/animation/TimeAnimator.java @@ -1,13 +1,11 @@ package android.animation; /** - * This class provides a simple callback mechanism to listeners that is synchronized with other - * animators in the system. There is no duration, interpolation, or object value-setting - * with this Animator. Instead, it is simply started and proceeds to send out events on every - * animation frame to its TimeListener (if set), with information about this animator, - * the total elapsed time, and the time since the last animation frame. - * - * @hide + * This class provides a simple callback mechanism to listeners that is synchronized with all + * other animators in the system. There is no duration, interpolation, or object value-setting + * with this Animator. Instead, it is simply started, after which it proceeds to send out events + * on every animation frame to its TimeListener (if set), with information about this animator, + * the total elapsed time, and the elapsed time since the previous animation frame. */ public class TimeAnimator extends ValueAnimator { @@ -59,10 +57,10 @@ public class TimeAnimator extends ValueAnimator { * Implementors of this interface can set themselves as update listeners * to a TimeAnimator instance to receive callbacks on every animation * frame to receive the total time since the animator started and the delta time - * since the last frame. The first time the listener is called, totalTime and - * deltaTime should both be zero. - * - * @hide + * since the last frame. The first time the listener is called, + * deltaTime will be zero. The same is true for totalTime, unless the animator was + * set to a specific {@link ValueAnimator#setCurrentPlayTime(long) currentPlayTime} + * prior to starting. */ public static interface TimeListener { /** @@ -70,7 +68,8 @@ public class TimeAnimator extends ValueAnimator { * along with information about the elapsed time.

* * @param animation The animator sending out the notification. - * @param totalTime The + * @param totalTime The total time elapsed since the animator started, in milliseconds. + * @param deltaTime The time elapsed since the previous frame, in milliseconds. */ void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime); diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 7ba17b336499e..8d32edcdf64d5 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -2166,15 +2166,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal float mScaleY = 1f; /** - * The amount of scale in the x direction around the pivot point. A - * value of 1 means no scaling is applied. + * The x location of the point around which the view is rotated and scaled. */ @ViewDebug.ExportedProperty float mPivotX = 0f; /** - * The amount of scale in the y direction around the pivot point. A - * value of 1 means no scaling is applied. + * The y location of the point around which the view is rotated and scaled. */ @ViewDebug.ExportedProperty float mPivotY = 0f;