开发者

Know Active Timer

In Android, after starting any timer using TIMER or CountDownTimer, is there any way to track them? For example, if we start 5 timer and we want to stop the second one(or update it), how to do that stuff? Thanks in ad开发者_StackOverflow中文版vance.


put all of them in a list, set timer's tag an id (id from the list) and set listener. so when any of the timers are ticking or finish, you will be notified and you can identify them by id from the tag

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜