Home > Mobile >  The problem of the Timer and TimerTask
The problem of the Timer and TimerTask

Time:10-04


As shown in figure, I want to determine button click popup window, the timer continues to timing, but always has a problem, how can pop-up Windows in timer timer after work?

CodePudding user response:

TimerTask cannot reuse after used, to the new one

CodePudding user response:

The Timer sendmessage to Activity let Activity popup window does not affect the Timer control

CodePudding user response:

Stars. Loop () is an infinite loop, you of the timer is blocked in here, you call what is the significance of stars here

CodePudding user response:

reference m - 1/f, oj response:
TimerTask cannot reuse after used, the new one
first: right, on the ground floor TimerTask cannot reuse
Second: you don't have to close the timer so the first time didn't stop

CodePudding user response:

reference weixin_43845112 reply: 3/f
stars. The loop () is an infinite loop, you of the timer is blocked in here, you call what is the significance of stars here

Found that the problem is, with runonuithread
  • Related