1

Pause a countdowntimer from another method within the same class

view story
linux-howto

http://stackoverflow.com – I'm trying to pause a countdown timer using the .cancel() function. But it won't pause. My cdTimer is a global variable in order for me to access in from another method. public void startTimer() { //create timer cdTimer = new CountDownTimer(timeLimit, 1000) { public void onTick(long millisUntilFinished) { timeLeft = (int)millisUntilFinished; if(millisUntilFinished < 60000) timer.setText("Time : 00 : " + String.valueOf(millisUntilFinished / 1000) ); else if(millisUntilFinished >= 60000 && millisUntilFinish (HowTos)