title: how to start Animation in onCreate() in android?
body: <p>I have done like these it not working?</p>
  
  <pre><code>public class AnimationActivity extends Activity{
              private AnimationDrawable yourAnimation; 
              @Override
              protected void onCreate(Bundle savedInstanceState) {
                  // TODO Auto-generated method stub
                  super.onCreate(savedInstanceState);
                  setContentView(R.layout.animation);  
                  getIntentValues();
                  final ImageView imageView = (ImageView) findViewById(R.id.animation_iv);   
                  imageView.setBackgroundResource(R.drawable.loadinganim);   
                  yourAnimation = (AnimationDrawable) imageView.getBackground(); 
                  yourAnimation.start();
      }
  </code></pre>
  
  <p>res\drawable\loading.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="false"&gt;  
      &lt;item android:drawable="@drawable/v1" android:duration="160" /&gt;  
      &lt;item android:drawable="@drawable/v4" android:duration="160" /&gt;  
      &lt;item android:drawable="@drawable/v7" android:duration="160" /&gt;  
      &lt;item android:drawable="@drawable/v8" android:duration="160" /&gt;  
      &lt;item android:drawable="@drawable/v9" android:duration="160" /&gt;  
      &lt;item android:drawable="@drawable/v10" android:duration="160" /&gt;  
      &lt;item android:drawable="@drawable/v11" android:duration="160" /&gt;  
     &lt;/animation-list&gt;
  </code></pre>
  
  <p>res\layout\animation.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent" 
   android:layout_height="fill_parent" 
      &gt;
  &lt;ImageView 
   android:id="@+id/animation_iv"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent" 
   /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Animation is starting on imageView onClick().if any one have idea help me.</p>