|
1 | 1 | package android.animation; |
2 | 2 |
|
3 | 3 | /** |
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. |
11 | 9 | */ |
12 | 10 | public class TimeAnimator extends ValueAnimator { |
13 | 11 |
|
@@ -59,18 +57,19 @@ void initAnimation() { |
59 | 57 | * Implementors of this interface can set themselves as update listeners |
60 | 58 | * to a <code>TimeAnimator</code> instance to receive callbacks on every animation |
61 | 59 | * 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. |
66 | 64 | */ |
67 | 65 | public static interface TimeListener { |
68 | 66 | /** |
69 | 67 | * <p>Notifies listeners of the occurrence of another frame of the animation, |
70 | 68 | * along with information about the elapsed time.</p> |
71 | 69 | * |
72 | 70 | * @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. |
74 | 73 | */ |
75 | 74 | void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime); |
76 | 75 |
|
|
0 commit comments