Possible Duplicate:
How come millisUntilFinished cannot detect exact CountDownTimer intervals?
Why does using the CountDownTimer show "1" twice? I just want it to countdown smoothly and not look like it is getting hung up on the last second. Anybody have any ideas on how to solve this problem??
Here is the code from the Android Developers page:
new CountdownTimer(30000, 1000) {
public void onTick(long millisUntilFinished) {
mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
}
public void onFinish() {
mTextField.setText("done!");
}
}.start();
I created a new project and copied and pasted this code in just to make sure that I wasn't accidentally messing something up in my program. I've been testing this on a Tab 10.1. It does this when I run it: "5", "4", "3", "2", "1", "1", "done!".