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.
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.
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.