I have created an AnimatedVectorDrawable, it works pretty well, now I am looking for a way to change the animation or hide the view after it finishes. I was hoping there was
Not tried this yet but Android 6.0 has a registerAnimationCallback method from the Animatable2 interface for this
Edit: yep this works in Android 6.0 emulator:
mAnimatedVectorDrawable.registerAnimationCallback (new Animatable2.AnimationCallback(){
public void onAnimationEnd(Drawable drawable){
//Do something
}
}
Edit2: looks like they haven't added support for this in the AnimatedVectorDrawableCompat from support lib 23.2+ :(
Edit3: it looks like this got added in support lib 25.3.0
Thanks Carson!