title: Android Multiple AnimatorSet reset
body: <p>Hi I am applying multiple animations to a view using AnimatorSet and ValueAnimator.</p>
  <p>When the user touches the view, successive animations are applied to the view. I do this to have a &quot;zooming effect&quot; when the user is moving his fingers on the view.</p>
  <p>The view is a custom gallery.</p>
  <p>Here is the code for animation:</p>
  <pre><code>private void createAnim(final View v) {
      animating = true;
      if (D)
          Log.i(TAG, &quot;sarting animation&quot;);
      try {
          v.clearAnimation();
          v.getAnimation().reset();
      } catch (Exception e) {
  
      }
      
      set = new AnimatorSet();
      
      set.addListener(new AnimatorListener() {
  
          @Override
          public void onAnimationStart(Animator animation) {
  
              
          }
  
          @Override
          public void onAnimationRepeat(Animator animation) {
  
          }
  
          @Override
          public void onAnimationEnd(Animator animation) {
              if (D)
                  Log.i(TAG, &quot;Animation ended&quot;);
              animating = false;
          }
  
          @Override
          public void onAnimationCancel(Animator animation) {
              animating = false;
              if (D)
                  Log.i(TAG, &quot;Animation cancelled&quot;);
  
          }
      });     
  
      set.setDuration(100);
  
      ValueAnimator v1 = ObjectAnimator.ofFloat(v, &quot;scaleX&quot;, mScaleFactor);
      ValueAnimator v2 = ObjectAnimator.ofFloat(v, &quot;scaleY&quot;, mScaleFactor);
  
      animationList.add(v1);
      animationList.add(v2);
      set.playTogether(v1, v2);
  
  set.start()
  }
  </code></pre>
  <p>I have an onTouchListener and on action move I successively call this method increasing or decreasing the mScaleFactor.</p>
  <p>When the user releases the finger I would like the view to go back to previous state, I mean to erase all animations applied as if they were never applied to view. The problem is you can easily do that for one animation but for many like that I just can't find the right way. Here is what I have tried:</p>
  <p>-Adding the animations to an ArrayList and doing animation.reverse() on each one of them with a delay of +100 added to each of them so the execute one after another but the end result just doesn't seem exactly the same as before animations.</p>
  <p>v.clearAnimation(); only cancels the last animation
  v.getAnimation().reset(); same only works for last/active animation.
  Is there a method to just get the view back as it was before any animation has been started?
  Thanks a lot</p>