I just made a Countdowntimer and a Progressbar :
public void button1_onClick (View view) {
mCountDownTimer=new CountDownTimer(10000,1000) {
@Override
public void onTick(long millisUntilFinished) {
Log.v("Log_tag", "Tick of Progress"+ i+ millisUntilFinished);
i++;
mProgressBar.setProgress(i);
}
@Override
public void onFinish() {
i++;
mProgressBar.setProgress(i);
game_end();
}
};
mCountDownTimer.start();
}
public void button2_reset_onClick (View view) {
mProgressBar.setProgress(0); }
It is also working but when I try to start it a second time I get no animation ? It counts until 10 but I cannot see it on the Progressbar... How can I reset the Progressbar properly ? I allready tried to make i = 0 but it doesnt helped