Hi All I am looking to have a timer bar created for an Android 2.2 quiz application. The bars speed can be increased/decreased/stopped by clicking on different buttons. A working sample of this code based on the requirements below will suffice.
Initial colour of the bar is blue
Countdown starts automatically when activity starts
15 seconds to complete (decrease to 0)
When the counter reaches 0 a new activity called nQuestion is loaded. This can just be a blank activity
The 1st button when clicked will speed up the timer bar making the time run twice as fast. The button label is 'faster' and the bar colour should change to red
The 2nd button when clicked stops the timer. The time remaining is displayed in a text view. The value of time remaining can be expressed whichever way is easiest. The label is 'stop'
The 3rd button slows the bar making it take twice as long to decrease. The colour should be green. Label is 'slow'.
The buttons may not be available on certain quiz types so it must be possible to disable them individually. This can be as simple as having a variable set to either 1 or 0. No interface is required to facilitate this.
Thanks for taking the time regards Cameron