You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
add more Animation APIs and call onAnimationEnd()
Directly calling onAnimationEnd() skips the animation and directly sets the target values
This commit is contained in:
@@ -3,10 +3,15 @@ package android.animation;
|
||||
public class Animator {
|
||||
|
||||
public interface AnimatorListener {
|
||||
public abstract void onAnimationEnd (Animator animation);
|
||||
}
|
||||
|
||||
public void setTarget(Object target) {}
|
||||
|
||||
public void start() {}
|
||||
|
||||
public void addListener(AnimatorListener listener) {
|
||||
listener.onAnimationEnd(Animator.this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package android.animation;
|
||||
* Any custom listener that cares only about a subset of the methods of this listener can
|
||||
* simply subclass this adapter class instead of implementing the interface directly.
|
||||
*/
|
||||
public abstract class AnimatorListenerAdapter /*implements Animator.AnimatorListener,
|
||||
public abstract class AnimatorListenerAdapter implements Animator.AnimatorListener/*,
|
||||
Animator.AnimatorPauseListener*/ {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
||||
@@ -28,8 +28,9 @@ public class ValueAnimator extends Animator {
|
||||
public int getRepeatCount() {return 0;}
|
||||
public int getRepeatMode() {return 0;}
|
||||
public void setInterpolator(TimeInterpolator interpolator) {}
|
||||
public void addListener(Animator.AnimatorListener listener) {}
|
||||
public void setFloatValues(float[] values) {}
|
||||
public boolean isRunning() {return false;}
|
||||
public void setIntValues(int[] values) {}
|
||||
|
||||
/**
|
||||
* Implementors of this interface can add themselves as update listeners
|
||||
|
||||
Reference in New Issue
Block a user