Return to Snippet

Revision: 48298
at June 28, 2011 15:46 by arpit


Initial Code
final Handler handler = new Handler(); 
	  final Runnable doUpdateView = new Runnable() { 
	    public void run() {
               // do something with your UI	   
	    } 
	  }; 

	  TimerTask myTimerTask = new TimerTask() { 
	    public void run() { 
	        handler.post(doUpdateView); 
	    } 
	  };
	  
	  Timer t = new Timer();
	  t.scheduleAtFixedRate(myTimerTask, 0, 60000);

Initial URL
https://groups.google.com/forum/#!topic/android-developers/o0xl0Eq_af0

Initial Description

                                

Initial Title
Updating the UI after an Timer interval

Initial Tags
android

Initial Language
Java