Code example for CountDownTimer

Methods: cancelstart

0
		if (countdown() > hurryUpTime) {
			updateBackgroundColor(backgroundRunning);
		} 
 
		restartPlayer(); 
		timer.cancel();
		timer.start();
	} 
 
	private void onStopCounting() { 
		timerRunning = false;
		updateBackgroundColor(backgroundNormal);
		updateTimerText(countdown()); 
 
	} 
 
	private void initTimer() { 
		timer = new CountDownTimer(countdown() * 1000, 250) {
			public void onTick(long millisUntilFinished) {
				int newTime = (int)((millisUntilFinished + 999) / 1000);
Contextual code suggestions in your IDE  Get Codota for Java