title: Seamless left to right activity transition animation in Android
body: <p>I have two activities and I want that when the user touches a button on the first activity, the new activity slides in from the left and moves to the right while the first activity does the same, it moves to the right and slides out, so it would give an effect in which the new activity pushes the old one to the right and replaces it. </p>
  
  <p>In order to do that, I have written the following XMLs:</p>
  
  <p><strong>In animation</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;translate
      android:fromXDelta="-100%"
      android:toXDelta="0"
      android:duration="1250" /&gt;
   &lt;/set&gt;
  </code></pre>
  
  <p><strong>Out animation</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
     &lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;translate
      android:fromXDelta="0"
      android:toXDelta="-100%"
      android:duration="1250" /&gt;
    &lt;/set&gt;
  </code></pre>
  
  <p>I call the <code>overridePendingTransition(R.anim.anim_in,R.anim.anim_out);</code> function in the onCreate method of the new activity. In the resulting effect, the new activity moves from the left to right correctly, but the first, older activity moves into the opposite direction; it moves to the left. I want to revert the moving direction of this first activity. How can I do that, is there a XML property which serves to this purpose?</p>