Wie zu stoppen CountDownTimer in android

Wie diese zu stoppen timer , keine Ahnung ?

Ich will reset-timer in jeder Abfrage, aber es geht weiter. Jede neue Abfrage, es fügt einen neuen timer. Wie man dieses Problem lösen?

 new CountDownTimer(zaman, 1000) {                     //geriye sayma

            public void onTick(long millisUntilFinished) {

                NumberFormat f = new DecimalFormat("00");
                long hour = (millisUntilFinished / 3600000) % 24;
                long min = (millisUntilFinished / 60000) % 60;
                long sec = (millisUntilFinished / 1000) % 60;

                cMeter.setText(f.format(hour) + ":" + f.format(min) + ":" + f.format(sec));
            }

            public void onFinish() {
                cMeter.setText("00:00:00");
            }
        }.start();

InformationsquelleAutor Taha | 2016-10-23

Schreibe einen Kommentar