Search code examples
androidanimationanimationdrawable

play 2 animationdrawables after each other


I would like to play 2 animationdrawables after eachother..

When the first one stops, the other one has to start..

The problem is:

AnimationListener is not possible with animationdrawables

Does anybody know a solution?

thank you


Solution

  • try this code

     final Handler handler = new Handler();
                                    handler.postDelayed(new Runnable() {
                                      public void run() {
                                          //start 2nd animation
                                      }
                                    }, delay);//delay is the time for how long 1st animation takes to complete