On Aug 21, 8:48 pm, cindy <[email protected]> wrote: > Hi Friend, > > I need to start a animation automatically for a activity without any > user clicking. I know when activity is not ready, animation could not > start. I used a thread to start it, however it is still not working. > > How could I know Activity is ready? > > Help is great appreciated. > > public void onCreate(Bundle savedInstanceState) > { > super.onCreate(savedInstanceState); > anim_record= (AnimationDrawable)img.getBackground(); > Timer initTimer=new Timer(); > Starter initRecord=new Starter(); > initTimer.schedule(initRecord, 10000); > // anim_record.start(); > > } > > class Starter extends TimerTask > { > public final void run() > { > anim_record.start(); > startRecording(); > } > > }
use addIdleHandler of MessageQueue, hope it helps pskink -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

