How to display images periodically
<p>I am new in android field. I am working on to display two images in center in my main.xml  periodically. The code is running successfully but it didn't show any image. Here is the code.     </p>

<pre><code>  package com.example.radio;
   import java.io.IOException;
   import java.util.Timer;
   import java.util.TimerTask;

   import android.app.Activity;
   import android.graphics.Bitmap;
   import android.graphics.BitmapFactory;
   import android.os.Bundle;
   import android.os.Handler;
   import android.os.Message;
   import android.util.Log;
   import android.widget.ImageView;

    public class Radio extends Activity 
    {
private ImageView _imagView;
private Timer _timer;
private int _index;
private MyHandler handler;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_radio);
    handler= new MyHandler();
    _imagView=(ImageView) findViewById(R.id.speak);

    _index=0;
    _timer= new Timer();
    _timer.schedule(new TickClass(), 500, 200);
}

private class TickClass extends TimerTask
{
    @Override
    public void run() {
        // TODO Auto-generated method stub
        handler.sendEmptyMessage(_index);
        _index++;
    }
}

private class MyHandler extends Handler
{
    @Override
    public void handleMessage(Message msg) {
        // TODO Auto-generated method stub
        super.handleMessage(msg);

        try {
                Bitmap bmp= BitmapFactory.decodeStream(Radio.this.getAssets().open("drum_"+_index+".png"));
                _imagView.setImageBitmap(bmp);

                Log.v("Loaing Image: ",_index+"");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            Log.v("Exception in Handler ",e.getMessage());
        }
    }}}
</code></pre>
