title: How to make smooth frame animation in android?
body: <p>I made a frame animation. But the transitition between images is bad looking. How can I apply a crossfade effect to it ?</p>
  
  <p>When using <code>TransitionDrawable</code> i get the proper result but it stops after one execution.</p>
  
  <p>Any one has an idea how to resolve it?</p>
  
  <pre><code>public void startAnimation() {
      if (logoAnimation != null) {
          if (logoAnimation.isRunning()) {
              logoAnimation.stop();
          }
          logoAnimation.start();
      }
  }
  
  private int setLogoAnimation(int animationID, int targetID) {
      imageView = (ImageView) window.findViewById(targetID);
      imageView.setImageResource(animationID);
      logoAnimation = (AnimationDrawable) imageView.getDrawable();
  
      if (imageView != null &amp;&amp; logoAnimation != null) {
          return 1;
      } else {
          return 0;
      }
  }
  </code></pre>
  
  <p>Than I simply run it by object.startAnimation(); I works, but the animation is ugly and I need it to be smooth.</p>