2

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();
            }
Kory
  • 31
  • 4
  • Can you provide more code? – Hephaestus Sep 13 '17 at 07:57
  • I'm currently reviewing this: https://stackoverflow.com/questions/28790985/programmatically-update-android-vector-drawable – Hephaestus Sep 13 '17 at 07:57
  • I think I am going to do this with a GridView instead, even with the mentioned library I am having trouble selecting the proper targetByName. – Kory Sep 13 '17 at 16:20
  • Yes, I'm surprised as the limitations in Android on this issue. From what I have read, Android has the methods to access interior groups in SVG objects but the methods are declared private and inaccessible. Its a shame as SVG is a great way to pre-build complicated shapes and object. There's gotta be a better way. – Hephaestus Sep 15 '17 at 16:50

0 Answers0