Run android animation on onCreate method
<p>I want to run my android animation soon after the application starts.<br>
I am using frame animation with an animation list in thunder.xml.
My code is given below. </p>

<pre><code>ImageView img = (ImageView) findViewById(R.id.animlist);    
img.setBackgroundResource(R.drawable.thunder);  
AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();
frameAnimation.start();
</code></pre>

<p>But this is running but not showing the animation.
If i create a button and set this as the onClick event of that button, then its working correctly.
But i want to run my android animation soon after the application starts. 
Please help me ..
Thanks in advance</p>
