title: Change position of view after end of animation
body: <p>I develop a widget based on <code>ViewGroup</code> and my problem is that I need to save position of items after the end of animation. I called <code>setFillAfter(true)</code> in my animation object I created <code>AnimationListener</code> and in it's <code>onAnimationEnd</code> method call <code>View.layout(l,t,r,b)</code> to set the position after animation, because I want animation to start from new item's position next time. But in this case it looks like items are layouted twice. If I don't use <code>View.layout(l,t,r,b)</code> at the end of animation, next animation starts from previous position. Here is my code:</p>
  
  <pre><code>private void scrollUp() {
      for(int i = 0; i &lt; getChildCount(); i++) {
          final View child = getChildAt(i);
          final int index = i; 
          final int newleft = child.getLeft() + mOffsetBetweenItems;
          final int newTop = child.getTop() - mOffsetBetweenItems;
          TranslateAnimation scrollUp = new TranslateAnimation(0, mOffsetBetweenItems, 0, -mOffsetBetweenItems);          
          scrollUp.setDuration(1500);
          scrollUp.setFillAfter(true);        
          scrollUp.setAnimationListener(
              new AnimationListener() {
  
                  @Override
                  public void onAnimationStart(Animation animation) {}
  
                  @Override
                  public void onAnimationRepeat(Animation animation) {}
  
                  @Override
                  public void onAnimationEnd(Animation animation) {
                      child.layout(newleft, newTop, newleft + child.getMeasuredWidth(), newTop + child.getMeasuredHeight() );
                  }
              }
          );
  
          child.startAnimation(scrollUp);
      }
  }
  </code></pre>
  
  <p>Please give me an advice how should I reset view's position accordingly to the end position of animation?</p>