title: Animation in RelativeLayout to slide down
body: <p>I need help to animate a RelativeLayout. The next image explain how is my aplication:</p>
  
  <p><img src="https://i.stack.imgur.com/ufKWh.png" alt="enter image description here"></p>
  
  <p>Now, when I touch a marker of a map, it displays a RelativeLayout (call Marker Title in the picture) and the animation to slide up works well, however, my code to slide down doesn't work well because it get down from top of the screen. My code is this:</p>
  
  <ul>
  <li><p>This is the code where it hides the RelativeLayout:</p>
  
  <pre><code> public void hideSlideUp() { 
      RelativeLayout slideLayout;
      slideLayout = (RelativeLayout) findViewById(R.id.sliding_up);
  
      if (slideLayout.getVisibility() != View.INVISIBLE) {
          Animation slide = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.slide_down);
          slideLayout.startAnimation(slide);
          slideLayout.setVisibility(View.INVISIBLE);
       }
  }
  </code></pre></li>
  <li><p>Animation xml file, now it's work wrong:</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;translate 
        android:fromXDelta="0" 
        android:fromYDelta="-1000" 
        android:duration="1000" /&gt;
  &lt;/set&gt;
  </code></pre></li>
  </ul>