I’d like to implement several timers (to create a multiple-stopwatches application), and CountDownTimer seems to be the obvious choice, however I’d like to provide the ability to pause one or all of the stopwatches.
From the documentation provided on CountDownTimer I don’t see an obvious way to pause the countdown after it has begun, only to stop it or to increase/decrease it by a set amount.
Thanks!
I don’t know much about using the CountDownTimer but I know that when I had to make a timer I used the built in Java Timer class with a TimerTask. If you were wanting to make several timers count down and pause them individually you could do something like this
This isnt exact syntax but I think it relays the idea. Just a heads up but if you go this route you can’t update the UI in that task normally, that would look like this.
which you would put in the “Run” part of the task. This doesn’t really have to do with the exact question but I was stuck for days on updating the UI part until someone here helped me out.