add more Animation APIs and call onAnimationEnd()

Directly calling onAnimationEnd() skips the animation and directly sets
the target values
This commit is contained in:
Julian Winkler
2023-09-01 12:30:27 +02:00
parent e522200e28
commit ad83271080
8 changed files with 40 additions and 2 deletions

View File

@@ -12,6 +12,8 @@ public class ViewPropertyAnimator {
}
public ViewPropertyAnimator setListener(Animator.AnimatorListener listener) {
if (listener != null)
listener.onAnimationEnd(null);
return this;
}
@@ -27,5 +29,17 @@ public class ViewPropertyAnimator {
return this;
}
public ViewPropertyAnimator rotation(float rotation) {
return this;
}
public ViewPropertyAnimator translationX(float translationX) {
return this;
}
public ViewPropertyAnimator translationY(float translationY) {
return this;
}
public void start() {}
}