android - How can I display a constantly updating time in my app's header -
i working on android app , using phonegap same. using jquery mobile. add clock or current time (updating/changing) being displayed @ top left corner of application's header.
can suggest me way achieve or using existing library this. can code trying not reinvent wheel.
if accuracy isn't important use handler , postdelayed().
handler handler = new handler(); void timer() { //update ui current time post new runnable run after 1000ms handler.postdelayed(new runnable() { @override public void run() { timer(); } }, 1000); return; }
Comments
Post a Comment