Starting and handling multiple CountDownTimers in Android -


in android, need start , display multiple countdowntimers @ same time, on same screen, 1 after another. how can proceed implementing this? using threads help?

you can define , array or list each timer want run, , define timer decrements them every second.

http://chat.stackoverflow.com/users/443141

has example on how schedule tasks every second. in method gets called every second, decrement values of arrays , update text-label.

... ( int i=0; < timers.length; i++) {    if ( timers[i] > 0 ) {       timers[i]--;       // update textlabel    } else {       // change text color, flash,vibrate,...    } } ... 

to reset timer set new seconds left value.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -