title: AnimationDrawable Pause ?
body: <p>Hello I was trying to Pause Animation Drawable but could not succeeded. With the help of stack overflow I atleast got the help of animationDrawable end listener here is the code for it . IS there any possible way where I can pause the animation Drawable and Start it from where it has paused ...</p>
  
  <pre><code>public abstract class CustomAnimationDrawable extends AnimationDrawable{
  
      /** Handles the animation callback. */
      Handler mAnimationHandler;
      Runnable r= new Runnable() {
  
          @Override
          public void run() {
              // TODO Auto-generated method stub
                 onAnimationFinish();
          }
      };
  
      public CustomAnimationDrawable(AnimationDrawable aniDrawable) {
          /* Add each frame to our animation drawable */
          for (int i = 0; i &lt; aniDrawable.getNumberOfFrames(); i++) {
              this.addFrame(aniDrawable.getFrame(i), aniDrawable.getDuration(i));
          }
      }
  
      @Override
      public void start() {
          super.start();
          /*
           * Call super.start() to call the base class start animation method.
           * Then add a handler to call onAnimationFinish() when the total
           * duration for the animation has passed
           */
          mAnimationHandler = new Handler();
          mAnimationHandler.postDelayed(r, getTotalDuration());
  
      }
  
      /**
       * Gets the total duration of all frames.
       * 
       * @return The total duration.
       */
      public int getTotalDuration() {
  
          int iDuration = 0;
  
          for (int i = 0; i &lt; this.getNumberOfFrames(); i++) {
              iDuration += this.getDuration(i);
          }
  
          return iDuration;
      }
  
      /**
       * Called when the animation finishes.
       */
      abstract void onAnimationFinish();
  
       public void destroy()
      {
  
  
           mAnimationHandler.removeCallbacksAndMessages(r);
           mAnimationHandler.removeCallbacksAndMessages(null);
  
  
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Kindly please help is there any way i can pause ?</p>