title: Android: What's wrong with my fragment transition animation?
body: <p>I just need plain slide in and slide out animation for Fragment transition, below is my code:
  slide_in_left.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shareInterpolator="true"&gt;
  &lt;translate
      android:fromXDelta="-100%"
      android:toXDelta="0%"
      android:fromYDelta="0%"
      android:toYDelta="0%"
      android:duration="700"&gt;
  &lt;/translate&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>slide_out_right.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shareInterpolator="false"&gt;
  &lt;translate
      android:fromXDelta="0%" android:toXDelta="100%"
      android:fromYDelta="0%" android:toYDelta="0%"
      android:duration="700"&gt;
  &lt;/translate&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>the code I used:</p>
  
  <pre><code>SomeFragment frag = SomeFragment.newInstance(foo);
  FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
  ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_right);
  ft.replace(R.id.the_fragment, frag);
  ft.addToBackStack(null);
  
  ft.commit();
  </code></pre>
  
  <p>The result looks very stranges, when the transition starts, the current fragment disappears without animation, the entering fragment comes(from left) like a scrolling paper. What's wrong with my animation xml code?</p>
  
  <p>Thanks!</p>