-2

I tried with many ways to do my countdown timer to skip some seconds on click. But no luck.

Is there a simple or advanced method to do it?

To skip seconds on click.

Pantelis
  • 7
  • 1
  • 1
  • 8
  • Pause it and then start it again. – Bas May 27 '15 at 10:02
  • @Panteliis take a look at the accepted answer, it probably does the job for you: http://stackoverflow.com/questions/11550561/pause-the-timer-and-then-continue-it – Bas May 27 '15 at 10:03
  • I would like to skip the seconds on real time. – Pantelis May 27 '15 at 10:03
  • No that question is not helpful. When click the button to remove some secs from the time left. I have lost many days for that – Pantelis May 27 '15 at 10:05

1 Answers1

1
yourButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
        // TODO-> Add check to see if timer value is greater than the value your subtracting
        // Otherwise your program probably crashes.
        yourTimer.addTime(-5000);       
    }
});

This way you are adding a negative value to your timer so it subtracts it. You can enter any value what you want I'm not sure what you want to achieve, so excuse me if this isn't what you wanted.

Bas
  • 4,423
  • 8
  • 36
  • 53