Animation on showing up in android
<p>I am trying to perform animation on 4 png images.
I have <code>drawable</code> folder in <code>res</code> folder,containing the images to be animated and one <code>animation.xml</code></p>

<p>Now my problem is that:when I say <code>animation.start</code>
I cannot see anything on the emulator</p>

<p><strong>my code:</strong></p>

<pre><code>package com.androcles.TreeActivity;

 import android.app.Activity;
 import android.graphics.drawable.AnimationDrawable;
 import android.os.Bundle;
 import android.widget.ImageView;

public class TreeActivity extends Activity {

 private ImageView image1;
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_tree);
   image1 = (ImageView)findViewById(R.id.imageView1);
   image1.setImageBitmap(null);
   image1.setBackgroundResource(R.drawable.animation);




final AnimationDrawable mailAnimation = (AnimationDrawable) image1.getBackground();
image1.post(new Runnable() {
    public void run()
    {
        if ( mailAnimation != null )
        {   
            System.out.println("Before Animation Starts...!!!!!");
            mailAnimation.start();
            System.out.println("After Animation Starts...!!!!!");
        }
    }
});
}
 }
</code></pre>
