I saw this tutorials (1 and 2) about using AnimatedVectorDrawableCompat
.
What's the way to play two animatedVectorDrawables sequentially?
For ObjectAnimator
I would use AnimatorSet
. For AnimatedVectorDrawableCompat
I should use AnimationCallback
?
if (drawable instanceof AnimatedVectorDrawableCompat) {
AnimatedVectorDrawableCompat avdc = (AnimatedVectorDrawableCompat) drawable;
avdc.registerAnimationCallback(new Animatable2Compat.AnimationCallback(){
public void onAnimationEnd(Drawable drawable) {
};
});
avdc.start();
}
I saw it's problematic for API and I thought to ask if there is a cleaner way.