Animation BEFORE activity change
<p>I'm trying to do something simple, but I can't understand why it's not working.<br>
What I'm trying to do is: when I touch an ImageView, it will show an animation on it. And then, only when that animation ends it will start the new activity.<br>
Instead, what happens is that the new activity starts right away and the animation is not shown.</p>

<p>Here is the animation xml:</p>

<pre><code>&lt;rotate android:interpolator="@android:anim/decelerate_interpolator"
    android:fromDegrees="-45"
    android:toDegrees="-10"
    android:pivotX="90%"
    android:pivotY="10%"
    android:repeatCount="3"
    android:fillAfter="false"
    android:duration="10000" /&gt;
</code></pre>

<p>And this is the code I use to call it:</p>

<pre><code>public void onCreate( Bundle savedInstanceState )
{
    final ImageView ib = (ImageView)this.findViewById( R.id.photo );
    ib.setOnClickListener( new OnClickListener( ) {

        @Override
        public void onClick( View v )
        {
            Animation hang_fall = AnimationUtils.loadAnimation( Curriculum.this, R.anim.hang_fall );
            v.startAnimation( hang_fall );
            Intent i = new Intent( ThisActivity.this, NextActivity.class );
            ThisActivity.this.startActivity( i );
        }// end onClick
    } );
}// end onCreate
</code></pre>

<p>As you see I tried putting a loooong time for the animation, but it doesn't work. The NextActivity starts right away, it doesn't wait for the animation in ThisActivity to finish.<br>
Any idea on why this happens?</p>
