I have a simple program with one TextView and two Buttons: Button1 and Button2.
Clicking on Button 1 will start a counter, increasing by 1 every 1 second and show res
This way it is much simpler. It is a feature made available on the android developer site. Link
public void initCountDownTimer(int time) {
new CountDownTimer(30000, 1000) {
public void onTick(long millisUntilFinished) {
textView.setText("seconds remaining: " + millisUntilFinished / 1000);
}
public void onFinish() {
textView.setText("done!");
}
}.start();
}