title: How to animate fragment removal
body: <p>I want to animate the removal of fragment.</p>
  
  <p>I tried: </p>
  
  <pre><code>getSupportFragmentManager().beginTransaction()
      .setCustomAnimations(R.anim.push_down_in, R.anim.push_up_out)
      .remove(myFragment)
      .commit();
  </code></pre>
  
  <p>but the fragment just disappears.</p>
  
  <p>I noticed the out animation only plays with 'replace', so I tried to replace the fragment with an empty Fragment like this:</p>
  
  <pre><code>getSupportFragmentManager()
      .beginTransaction()
      .setCustomAnimations(R.anim.push_down_in, R.anim.push_up_out)
      .replace(viewId, new Fragment())
  .commit();
  </code></pre>
  
  <p>But it still just disappears disappears.</p>
  
  <p>So, how can I animate the removal of fragment?</p>