title: How to start an start activity after android animation is over
body: <p>How to start an activity after the animation has ended.
  I have added android:oneshot="true" in the xml but how to start a new activity 
  after this animation has stopped.I have attached the entire code below.
  Please let me know how to start new activity.</p>
  
  <pre><code>    package com.appsolut.example.animation;
  
  
      import android.app.Activity;
      import android.content.Intent;
      import android.graphics.drawable.AnimationDrawable;
      import android.os.Bundle;
      import android.widget.ImageView;
  
      public class Animation extends Activity {
  
      ImageView animation;
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
  
      }
  
      @Override
  
      public void onWindowFocusChanged (boolean hasFocus) {
          super.onWindowFocusChanged(hasFocus);
          AnimationDrawable frameAnimation = 
              (AnimationDrawable) animation.getBackground();
  
          if(hasFocus) {          
  
              frameAnimation.start();
  
  
          } else {
              frameAnimation.stop();
  
          }
  
      }
  
  
      public void onStart() {
          {
              super.onStart();
  
              animation = (ImageView)findViewById(R.id.imageAnimation);
  
              animation.setBackgroundResource(R.drawable.animation);      
  
          }
      }
  }
  </code></pre>
  
  <p>animation.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;animation-list xmlns:android="http://schemas.android.com/apk/res/android"
          android:oneshot="true"   &gt;
  
          &lt;item android:drawable="@drawable/img00000" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00001" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00002" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00003" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00004" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00005" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00006" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00007" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00008" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00009" android:duration="500" /&gt;
          &lt;item android:drawable="@drawable/img00010" android:duration="500" /&gt;
  
      &lt;/animation-list&gt;
  </code></pre>