title: Animation method applyTransformation not triggered until I click any layout
body: <p>This is so weird, I've this animation code:</p>
  
  <pre><code>public class ExpandAnimation extends Animation {
  private View mAnimatedView;
  private MarginLayoutParams mViewLayoutParams;
  private int mMarginStart, mMarginEnd;
  private boolean mWasEndedAlready = false;
  
  /**
  * Initialize the animation
  * @param view The layout we want to animate
  * @param duration The duration of the animation, in ms
  */
      public ExpandAnimation(View view, int duration) {
          setDuration(duration);
          mAnimatedView = view;
          mViewLayoutParams = (MarginLayoutParams) view.getLayoutParams();
  
          mMarginStart = mViewLayoutParams.rightMargin;
          mMarginEnd = (mMarginStart == 0 ? (0- view.getWidth()) : 0);
          view.setVisibility(View.VISIBLE);
          mAnimatedView.requestLayout();
      }
  
      @Override
      protected void applyTransformation(float interpolatedTime, Transformation t) {
          super.applyTransformation(interpolatedTime, t);
          if (interpolatedTime &lt; 1.0f) {
              // Calculating the new bottom margin, and setting it
              mViewLayoutParams.rightMargin = mMarginStart
                      + (int) ((mMarginEnd - mMarginStart) * interpolatedTime);
              // Invalidating the layout, making us seeing the changes we made
              mAnimatedView.requestLayout();
  
          // Making sure we didn't run the ending before (it happens!)
          } else if (!mWasEndedAlready) {
              mViewLayoutParams.rightMargin = mMarginEnd;
              mAnimatedView.requestLayout();
              mWasEndedAlready = true;
          }
      }
  }
  </code></pre>
  
  <p>And I use this Animation:</p>
  
  <pre><code>View parent = (View) v.getParent();
  View containerMenu = parent.findViewById(R.id.containerMenu);
  ExpandAnimation anim=new ExpandAnimation(containerMenu, 1000);
  containerMenu.startAnimation(anim);
  </code></pre>
  
  <p>This animation toggle a layout hidding / showing it. </p>
  
  <p>By default, its hidden. When I click, animation works and it's shown. When I click again, it shrinks correctly. But the 3rd time, it does nothing. I've debugged and I found out that the constructor is called <strong>but not</strong> <code>applyTransformation</code>. 
  <strong>Somehow, if I click any layout around the screen, the animation suddenly starts.</strong></p>
  
  <p>Any idea?</p>
  
  <p><strong>Edit</strong>
  Does anyone know WHEN is applyTransformation triggered?</p>