title: Overriding pending transition in android
body: <p>I have two activities.. Activity A and Activity B.</p>
  
  <p>When I start Activity B from Activity A. I want Activity A to be static to its positions and animations to show up only for Activity B. How do i achieve this using overridingPendingTransition? </p>
  
  <p>This below code is called from ActivityA when button is clicked as follows :</p>
  
  <p><strong>Activity A:</strong></p>
  
  <pre><code>public void onClick(View v) {
          super.onClick(v);
           if (v.getId() == R.id.button) {
              Intent intent = new Intent();
              intent.setClass(getApplicationContext(), MyProfileActivity.class);
              startActivity(intent);
              overridePendingTransition(R.anim.slide_in_up, R.anim.slide_out_up);
          }
  </code></pre>
  
  <p>Activity A also slides with Activity B.
  How to stop the animation of Activity A and enable animations of Activity B alone?</p>
  
  <p><strong>slide_out_up xml is as follows :</strong></p>
  
  
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"
      android:shareInterpolator="false" &gt;
  
      &lt;translate
          android:duration="400"
          android:fromYDelta="0%"
          android:toYDelta="-100%" /&gt;
  
      &lt;alpha
          android:duration="400"
          android:fromAlpha="1"
          android:toAlpha="0" /&gt;
  
  &lt;/set&gt;
  </code></pre>
  
  <p><strong>slide_in_up :</strong></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:duration="400"
          android:fromYDelta="100%"
          android:toYDelta="0%" /&gt;
  
      &lt;alpha
          android:duration="400"
          android:fromAlpha="0"
          android:toAlpha="1" /&gt;
  
  &lt;/set&gt;
  </code></pre>