title: TranslateAnimation move view off screen -Android
body: <p>I'm using the following animation on a GridView, </p>
  
  <p>I hide it when the activity loads up with slideToBottom(myGridView);</p>
  
  <pre><code>public void slideToBottom(View view){
      TranslateAnimation animate = new TranslateAnimation(0,0,0,view.getHeight());
      animate.setDuration(500);
      animate.setFillAfter(true);
      view.startAnimation(animate);
      view.setVisibility(View.GONE);
  }
  </code></pre>
  
  <p>The problem I'm having is that when click a botton to show the view it just makes it visible with no animation, when I click it again it loads the animation, the code to slide it to top is below,</p>
  
  <pre><code>public void slideToTop(View view){
      TranslateAnimation animate = new TranslateAnimation(0,0,view.getHeight(),0);
      animate.setDuration(1000);
      animate.setFillAfter(true);
      view.startAnimation(animate);
      view.setVisibility(View.VISIBLE);
  
  }
  
  
  &lt;RelativeLayout
  
      android:id="@+id/container"
      android:focusable="true"
      android:focusableInTouchMode="true"
      android:layout_width="fill_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:clipChildren="false"
      android:clipToPadding="false"
      &gt;
      ....some other stuff here
  
      &lt;GridView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/myGridView"
          android:horizontalSpacing="2dip"
          android:numColumns="3"
          android:scrollbars="vertical"
          android:verticalSpacing="0dip"
          android:paddingTop="8dp"
           /&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>