* commit '22cc9d47b1ba41f93669d9659340337392cd677e': Add reset to AVD
This commit is contained in:
@@ -12191,6 +12191,7 @@ package android.graphics.drawable {
|
||||
method public int getOpacity();
|
||||
method public boolean isRunning();
|
||||
method public void registerAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
|
||||
method public void reset();
|
||||
method public void setAlpha(int);
|
||||
method public void setColorFilter(android.graphics.ColorFilter);
|
||||
method public void start();
|
||||
|
||||
@@ -12504,6 +12504,7 @@ package android.graphics.drawable {
|
||||
method public int getOpacity();
|
||||
method public boolean isRunning();
|
||||
method public void registerAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
|
||||
method public void reset();
|
||||
method public void setAlpha(int);
|
||||
method public void setColorFilter(android.graphics.ColorFilter);
|
||||
method public void start();
|
||||
|
||||
@@ -578,6 +578,15 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable2 {
|
||||
return mAnimatorSet.isStarted();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the AnimatedVectorDrawable to the start state as specified in the animators.
|
||||
*/
|
||||
public void reset() {
|
||||
// TODO: Use reverse or seek to implement reset, when AnimatorSet supports them.
|
||||
start();
|
||||
mAnimatorSet.cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
ensureAnimatorSet();
|
||||
|
||||
Reference in New Issue
Block a user