title: How to animate just one Activity when Activity change?
body: <p>When  change from <code>Ativity A</code> to <code>Activity B</code> and viceversa  I want that <strong>only</strong> <code>Activity B</code> to animate, but in my case <code>Activity A</code> also animates.(leaving a blank space in the left of the screen) <code>Activity B</code> animation is working well, my problem is with the animation of <code>Activity A</code>.(which shouldn't exists). I have set </p>
  
  <pre><code>//Activity B
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      overridePendingTransition(R.anim.fadein, R.anim.fadeout);
      setContentView(R.layout.mylayout); 
        //..........
    }
  </code></pre>
  
  <p>only in <code>Activity B</code>. I want that <code>Activity A</code> never animates or disappears from the screen.</p>
  
  <p>I <strong>fixed the reverse animation</strong>(change from <code>Activity B</code> to <code>Activity A</code>) in this way: </p>
  
  <pre><code>//Activity B
  @Override
  public void onPause(){
      super.onPause();
      overridePendingTransition(0, R.anim.fadeout);
  }
  </code></pre>
  
  <p>This works good, so, now the problem is only with the change from <code>Activity A</code> to <code>Activity B</code>, I would like the same behave of <code>Activity A</code>(just stay, no animation).
  But If I try <code>overridePendingTransition(R.anim.fadein, 0);</code> in <code>onCreate()</code>, <code>Activity A</code> disappears from the screen.</p>
  
  <p>fadein.xml</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
  android:interpolator="@android:anim/accelerate_interpolator"&gt;
      &lt;translate android:fromXDelta="100%p" android:toXDelta="0%p" android:duration="1000"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>fadeout.xml</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
       android:interpolator="@android:anim/accelerate_interpolator"&gt;
          &lt;translate android:fromXDelta="0%p" android:toXDelta="100%p" android:duration="1000"/&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>In the first image is what I get now, in the second image is what I want to get.</p>
  
  <p><img src="https://i.stack.imgur.com/vF0kH.png" alt="">
  <img src="https://i.stack.imgur.com/GCv28.png" alt="enter image description here"></p>