Code example for CountDownTimer

Methods: cancelstart

0
 
			@Override 
			public void onClick(View v) {
				// TODO Auto-generated method stub 
				if (!timerStarted && countDownTimer != null) {
					countDownTimer.start();
					timerStarted = true;
					timer_started = true;
					startB.setText("Cancel");
 
				} else if(timerStarted && countDownTimer != null) {
					countDownTimer.cancel();
					timerStarted = false;
					timer_started = false;
					startB.setText("Start");
				} 
			} 
			 
		}); 
 
Experience pair programming with AI  Get Codota for Java