Obtain a flip,"back to back" animation for activity transition
<p>I have 2 activities, I want the user thinks that they are back to back, like classic secret rotating walls in some old films: when user switches to second activity first one rotates from right to left, showing the back which is the second activity. </p>

<p>I'm really not good with animations, this is the first one I try..I made this xml file in res/anim:</p>

<p>Rotation 1:</p>

<pre><code>&lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
        android:toDegrees="-90"
        android:toYScale="0.0"
        android:pivotX="50%"
        android:pivotY="50%"
        android:duration="1000"/&gt;
</code></pre>

<p>Rotation 2 :</p>

<pre><code>&lt;rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="-90"
        android:toDegrees="-180"
        android:toYScale="0.0"
        android:pivotX="50%"
        android:pivotY="50%"
        android:duration="1000"/&gt;
</code></pre>

<p>and in code, simply:</p>

<pre><code>startActivity(matchIntent);
overridePendingTransition( R.anim.first_rotate, R.anim.second_rotate );
</code></pre>

<p>but I just obtain a fast flash as transition...and I set duration to 1000 too!</p>

<p><strong>EDIT:
I found my answer here: <a href="http://stackoverflow.com/questions/11069250/how-to-apply-3d-transition-between-two-activities-in-android">How to apply 3d transition between two activities in android?</a>
now the only problem left is that during animation background is default white..is there a way to set it to another color, for example red?</strong></p>
