title: Android fragment animation first time stuck
body: <p>I am doing an animation inside a fragment.</p>
  
  <p>I have 2 views on top of each other, one of them set on <code>View.GONE</code>.
  when I press a button I want my 2nd fragment to translate animation from the bottom to top.
  I am doing it fine and it's working great,
  the problem is that in my first run, the xml view is gone, but he is in the same Y he is suppose to be.
  so the first animation I do isn't doing anything, just switch from <code>GONE</code> to <code>VISIBLE</code>, after that, I press dismiss and the fragment goes away and comes back just like I want too.
  my problem is just the first run.
  how can I set my view Y to be 100% below my screen?</p>
  
  <p>here's the code I use :</p>
  
  <pre><code>private void moreCustomAnimation() {
  
      int yOffset = moreMenuFrameLayout.getMeasuredHeight();
      TranslateAnimation moveAnim = new TranslateAnimation(0, 0, yOffset, 0);
      moveAnim.setDuration(500);
      moveAnim.setFillAfter(true);
      blackView.setVisibility(View.VISIBLE);
      moreMenuFrameLayout.setVisibility(View.VISIBLE);
      moreMenuFrameLayout.startAnimation(moveAnim);
  
      moveAnim.setAnimationListener(new Animation.AnimationListener() {
          @Override
          public void onAnimationStart(Animation animation) {
  
          }
          @Override
          public void onAnimationEnd(Animation animation) {
          }
          @Override
          public void onAnimationRepeat(Animation animation) {
  
          }
      });
  }
  </code></pre>
  
  <p>on the way out of the screen I use the same code just switch the
  yOffset to the other Y integer, and set the view to <code>GONE</code> at animation end.</p>
  
  <p>thanks a lot in advance for any help !</p>