title: Transitions between two Android activities not behaving as expected
body: <p>I have some transitions set up between two activities, <code>ActivityA</code> and <code>ActivityB</code>, but they don't behave as expected. The Android API is 22 (5.0 Lollipop). A slow transition between activities is used because both activities have webviews that take a few seconds for their layouts to stabilize.</p>
  
  <p><code>ActivityA</code> is a <code>NativeActivity</code> and has two methods for switching between activities that are invoked from C++ code.</p>
  
  <pre><code>class ActivityA extends NativeActivity
  {
      ...
      protected void startActivityA()
      {
          startActivity(getApplicationContext(), ActivityA.class);
          overridePendingTransitions(R.anim.slow_fade_in, R.anim.slow_fade_out);
      }
  
      protected void startActivityB()
      {
          startActivity(getApplicationContext(), ActivityB.class);
          overridePendingTransitions(R.anim.slow_fade_in, R.anim.slow_fade_out);
      }
      ...
  }
  </code></pre>
  
  <p><code>ActivityB</code> is an <code>Activity</code>.</p>
  
  <p>The <code>res/anim/show_fade_in.xml</code> transition is:</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;alpha
          android:interpolator="@android:anim/accelerate_interpolator"
          android:fromAlpha="0.0" android:toAlpha="1.0"
          android:factor="1.0"
          android:fillAfter="true"
          android:fillBefore="true" android:fillEnabled="true"
          android:duration="5000" /&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>The <code>res/anim/slow_fade_out.xml</code> transition is:</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;alpha
          android:interpolator="@android:anim/decelerate_interpolator"
          android:fromAlpha="1.0" android:toAlpha="0.0"
          android:factor="1.0"
          android:fillAfter="true"
          android:fillBefore="true" android:fillEnabled="true"
          android:duration="5000" /&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>When <code>ActivityA.startActivityB()</code> is invoked from C++ code, I notice two things happen:</p>
  
  <ol>
  <li>A slow fade to light gray of <code>ActivityA</code>.</li>
  <li>The sudden appearance of the stabilized <code>ActivityB</code> webview.</li>
  </ol>
  
  <p>I don't understand why #2 is a sudden appearance and not a slow fade.</p>
  
  <p>When <code>ActivityA.startActivityA()</code> is invoked from C++ code, all I see is a quick cross-fade from <code>ActivityB</code> to <code>ActivityA</code>. I don't understand why I get a quick cross-fade instead of the programmed slow fades.</p>
  
  <p>Why might I not be getting the results I expect?</p>