开发者

Android timer problem

I am using timer in my application for the background process and开发者_开发问答 the timer runs successfully. But the problem is that i have to stop timer when logout button is clicked , the logout button is in different Activity. i have used timer.cancel() but As the Both Activity different it does't work. so give some hint to stop timer.


Declare your Timer as public static Timer timer; and you will be able to access it in any Activity or class using Acitivity_name.timer.cancel();

Thanks...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜