Skip to content

Commit f492b43

Browse files
chethaaseAndroid (Google) Code Review
authored andcommitted
Merge "Make the TimeAnimator class public."
2 parents af87216 + a33de55 commit f492b43

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

api/current.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,6 +2349,15 @@ package android.animation {
23492349
method public void setPropertyName(java.lang.String);
23502350
}
23512351

2352+
public class TimeAnimator extends android.animation.ValueAnimator {
2353+
ctor public TimeAnimator();
2354+
method public void setTimeListener(android.animation.TimeAnimator.TimeListener);
2355+
}
2356+
2357+
public static abstract interface TimeAnimator.TimeListener {
2358+
method public abstract void onTimeUpdate(android.animation.TimeAnimator, long, long);
2359+
}
2360+
23522361
public abstract interface TimeInterpolator {
23532362
method public abstract float getInterpolation(float);
23542363
}

core/java/android/animation/TimeAnimator.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package android.animation;
22

33
/**
4-
* This class provides a simple callback mechanism to listeners that is synchronized with other
5-
* animators in the system. There is no duration, interpolation, or object value-setting
6-
* with this Animator. Instead, it is simply started and proceeds to send out events on every
7-
* animation frame to its TimeListener (if set), with information about this animator,
8-
* the total elapsed time, and the time since the last animation frame.
9-
*
10-
* @hide
4+
* This class provides a simple callback mechanism to listeners that is synchronized with all
5+
* other animators in the system. There is no duration, interpolation, or object value-setting
6+
* with this Animator. Instead, it is simply started, after which it proceeds to send out events
7+
* on every animation frame to its TimeListener (if set), with information about this animator,
8+
* the total elapsed time, and the elapsed time since the previous animation frame.
119
*/
1210
public class TimeAnimator extends ValueAnimator {
1311

@@ -59,18 +57,19 @@ void initAnimation() {
5957
* Implementors of this interface can set themselves as update listeners
6058
* to a <code>TimeAnimator</code> instance to receive callbacks on every animation
6159
* frame to receive the total time since the animator started and the delta time
62-
* since the last frame. The first time the listener is called, totalTime and
63-
* deltaTime should both be zero.
64-
*
65-
* @hide
60+
* since the last frame. The first time the listener is called,
61+
* deltaTime will be zero. The same is true for totalTime, unless the animator was
62+
* set to a specific {@link ValueAnimator#setCurrentPlayTime(long) currentPlayTime}
63+
* prior to starting.
6664
*/
6765
public static interface TimeListener {
6866
/**
6967
* <p>Notifies listeners of the occurrence of another frame of the animation,
7068
* along with information about the elapsed time.</p>
7169
*
7270
* @param animation The animator sending out the notification.
73-
* @param totalTime The
71+
* @param totalTime The total time elapsed since the animator started, in milliseconds.
72+
* @param deltaTime The time elapsed since the previous frame, in milliseconds.
7473
*/
7574
void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime);
7675

core/java/android/view/View.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,15 +2166,13 @@ static class TransformationInfo {
21662166
float mScaleY = 1f;
21672167

21682168
/**
2169-
* The amount of scale in the x direction around the pivot point. A
2170-
* value of 1 means no scaling is applied.
2169+
* The x location of the point around which the view is rotated and scaled.
21712170
*/
21722171
@ViewDebug.ExportedProperty
21732172
float mPivotX = 0f;
21742173

21752174
/**
2176-
* The amount of scale in the y direction around the pivot point. A
2177-
* value of 1 means no scaling is applied.
2175+
* The y location of the point around which the view is rotated and scaled.
21782176
*/
21792177
@ViewDebug.ExportedProperty
21802178
float mPivotY = 0f;

0 commit comments

Comments
 (0)