Set up a Timer to run a TimerTask every 3 seconds. The TimerTask only has to call the button's setText method to change the button's text. You would have to do this within the UI
thread, so
you should use post to run a Runnable object that will perform the update an the correct thread.
you can try this:-
AnimationDrawable animation = new AnimationDrawable();
animation.addFrame(getResources().getDrawable(R.drawable.image1), 100);
animation.addFrame(getResources().getDrawable(R.drawable.image2), 500);
animation.addFrame(getResources().getDrawable(R.drawable.image3), 300);
animation.setOneShot(false);
ImageView imageAnim = (ImageView) findViewById(R.id.img);
imageAnim.setBackgroundDrawable(animation);
// start the animation!
animation.start()
Thanks and Regard
Shujat khan