title: Android Animation , a simple linear_interpolator
body: <p>I want to animate a list it will be hidden under the screen, bottomMargin is a negative value
  then when I click a button, I animate it up, then after the animation is done "onAnimationEnd" I modify the margin to make it stop in the place of the animation ends.</p>
  
  <p>it's working good when animate down, I don't see any thing after it goes to -ve</p>
  
  <p>BUT in the animate up, it's go more than it have too, and modifying the margin, make a bad effect "as it's not stopping where it have to"
  here is what I'm doing</p>
  
  <p>animation down:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:interpolator="@android:anim/linear_interpolator"&gt;
      &lt;!-- same animation, linear interpolator --&gt;
      &lt;translate xmlns:android="http://schemas.android.com/apk/res/android"
          android:toYDelta="25%p"
          android:duration="500"
       /&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>animation up:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:interpolator="@android:anim/linear_interpolator"&gt;
      &lt;!-- same animation, linear interpolator --&gt;
      &lt;translate xmlns:android="http://schemas.android.com/apk/res/android"
          android:toYDelta="-25%p"
          android:duration="500"
       /&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>the code run in the onAnimationEnd:</p>
  
  <pre><code>MarginLayoutParams params = (MarginLayoutParams) playerLayout.getLayoutParams();
  if (params.bottomMargin == 0) {
  params.setMargins(0, 0, 0, playerLayout.getHeight()* -1);
  } else {
  params.setMargins(0, 0, 0, 0);
  }
  playerLayout.setLayoutParams(params);
  </code></pre>
  
  <p>what is wrong!!!
  in the animate up, the animated area start to appear normally, then suddenly it goes up fast upper than the normal place, then the modification of margin make it suddenly re-position to the normal place.</p>
  
  <p>here a link to a video showing the problem <a href="https://dl.dropbox.com/u/51616029/irrelevant/20121005323.mp4" rel="nofollow">https://dl.dropbox.com/u/51616029/irrelevant/20121005323.mp4</a></p>