I would like to know how to display the time remaining in my handler. When I click a button, I run my handler for x seconds, and I want to display a countdown on the screen before the end of the handler.
Example of showing a 30 second countdown in a text field:
new CountDownTimer(30000, 1000) {
public void onTick(long millisUntilFinished) {
mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
}
public void onFinish() {
mTextField.setText("done!");
}
}.start();