title: Screen transition effects android
body: <p>I am trying left to right swipe transition of button click in screen one and right to left transition from screen 2 to screen one. The following is the codes</p>
  
  <p>Screen 1:</p>
  
  <pre><code>Intent intent = new Intent(CustomActivityTransitionActivity.this, SecondActivity.class);
  overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
  startActivity(intent);
  </code></pre>
  
  <p>Screen 2:</p>
  
  <pre><code>Intent intent = new Intent(SecondActivity.this, CustomActivityTransitionActivity.class);
  overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
  startActivity(intent);
  </code></pre>
  
  <p>The respective anims are give below,</p>
  
  <p>Slide_in_left</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
      android:shareInterpolator="false" &gt;
  
      &lt;translate
          android:duration="200"
          android:fromXDelta="-100%"
          android:fromYDelta="0%"
          android:toXDelta="0%"
          android:toYDelta="0%" /&gt;
  
  &lt;/set&gt;
  </code></pre>
  
  <p>Slide_out_left</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
      android:shareInterpolator="false" &gt;
  
      &lt;translate
          android:duration="200"
          android:fromXDelta="0%"
          android:fromYDelta="0%"
          android:toXDelta="-100%"
          android:toYDelta="0%" /&gt;
  
  &lt;/set&gt;
  </code></pre>
  
  <p>Slide_in_right</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
      android:shareInterpolator="false" &gt;
  
      &lt;translate
          android:duration="200"
          android:fromXDelta="100%"
          android:fromYDelta="0%"
          android:toXDelta="0%"
          android:toYDelta="0%" /&gt;
  
  &lt;/set&gt;
  </code></pre>
  
  <p>Slide_out_right</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
      android:shareInterpolator="false" &gt;
  
      &lt;translate
          android:duration="200"
          android:fromXDelta="0%"
          android:fromYDelta="0%"
          android:toXDelta="100%"
          android:toYDelta="0%" /&gt;
  
  &lt;/set&gt;
  </code></pre>
  
  <p>It is giving some top transition, however if i use only one say from left to right swipe and disable right to left, its working. Please guide where i am going wrong with what values to replace. </p>