Update: 20/11/13: This is still unresolved.
I am making a CountDownTimer
and in the onFinish()
method, I am apparently doing too much work as the delay between the last second and the finish takes longer than 1 second (which is my delay between ticks).
This is my code.
mCountDownTimer = new CountDownTimer(GAME_LENGTH, 1000) {
public void onTick(long millisUntilFinished) {
mCountDownTextView.setText("" + millisUntilFinished / 1000);
}
public void onFinish() {
mCountDownTextView.setText("Game Over!");
tl.setOnTouchListener(null);
for (DotView dv : mAllDots) {
dv.setChangingColors(false, null, -1); // This is my own method
}
}
The question is: Is there a way to perform a potentially long running action in the onFinish()
method of a CountDownTimer
without the actual timings between the penultimate and last tick being affected?