title: clearAnimation() and onAnimationEnd() in android
body: <p>I am using multiple animations and playing animations one after other. Currently using onAnimationEnd() to play animations one after other. In case of onTouch, I need to stop the animation and need to set different bitmap to imageview in touch location. Currently  using below code but facing problems in case of clearAnimation().</p>
  
  <pre><code>@Override
  public boolean onTouch(View v, MotionEvent event) {      
  
  switch(event.getAction()) {
  
  case MotionEvent.ACTION_UP:
  
      imageArray[g_animCount - 1].clearAnimation();   
  
      break;
  
  default:
     break;
  
  }
  
  return true; // indicate event was handled
  }
  
  
  
     @Override
     public void onAnimationEnd(Animation animation) {
  
      layout.removeView(imageArray[g_animCount - 1]);
  
      if ( (g_animCount &lt; count))
      {               
          startNextAnimation();
      }
      else
      {
          g_animCount = 0;
          isBegin = false;
      }
  </code></pre>
  
  <p>}</p>
  
  <h2>Problems and queries:</h2>
  
  <p>After clear animation, I could see image again at the beginning location, how to keep it at touch location ? tried setFillAfter(true) but no use.</p>
  
  <p>How to define onAnimationEnd() in case to play animations one after other ? do we need to remove imageview?</p>
  
  <p>Without clearAnimation() I do not have any problems but it does not solve my problem. Kindly correct my code.</p>