Reputation: 31
I am trying to animate groups inside my AnimatedVectorDrawable without them reseting after each is shown. The id provided is my animation for each group, but when called a second time the first group is lost. Any Ideas?
animationView.setBackgroundResource(id);
animationDrawable = (AnimatedVectorDrawable) animationView.getBackground();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
animationDrawable.start();
}
Upvotes: 2
Views: 374