Logo Icon Logo
A Crowd-sourced Cookbook on Writing Great Android® Apps
GitHub logo Twitter logo OReilly Book Cover Art

Program: A Simple CountDownTimer example


Require a simple count down timer


Android comes with a built-in class for constructing CountDownTimers. Its easy to use, efficient and works..(that goes without saying!).
  • Create a subclass of CountDownTimer.
  • Override the onTick() and onFinish() methods.
  • Instantiate a new instance in your Android Activity,
  • Call the start() method on the new instance created!


    File: main.xml width="fillparent" android:layoutheight="fillparent">