Skip to content

Instantly share code, notes, and snippets.

@RafalSladek
Created July 27, 2016 09:06
Show Gist options
  • Select an option

  • Save RafalSladek/adcced6d955eb80f10283f287438c72b to your computer and use it in GitHub Desktop.

Select an option

Save RafalSladek/adcced6d955eb80f10283f287438c72b to your computer and use it in GitHub Desktop.
Android Java - how to count down, onTick and onFinish
new CountDownTimer(10000, 1000) {
@Override
public void onTick(final long inL) {
// countdown is counting down every 1000 milliseconds = 1sec
}
@Override
public void onFinish() {
// counter is finished after 10000 millieseconds = 10sec
}
}.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment