title: How do you cancel CountDownTimer?
body: <p>I have a AlertDialog with a countdown timer in it, and I have a cancel button setup and it cancels the dialog but the timer keeps going! Does anyone know how to cancel the countdown of a countdown timer? Any help would be appreciated!</p>
  
  <pre><code>   private void timerDialog() {
      timerDialog = new AlertDialog.Builder(this).create();  
      timerDialog.setTitle("Timer");  
      timerDialog.setMessage("Seconds Remaining: "+timerNum*1000);
      timerDialog.setCancelable(false);
      timerDialog.setButton("Cancel", new DialogInterface.OnClickListener() {
          public void onClick(DialogInterface aboutDialog, int id) {
             timerDialog.cancel();
          }
      });
      timerDialog.show();
      new CountDownTimer(timerNum*1000, 1000) {
          @Override
          public void onTick(long millisUntilFinished) {
              timerDialog.setMessage("Seconds Remaining: "+ (millisUntilFinished/1000));
          }
  
          @Override
          public void onFinish() {
              Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
              v.vibrate(500);
              timerDialog.cancel();
          }
      }.start();
  
  }
  </code></pre>