I have a seekbar in my activity. In the button event when I go to another activity and then use back button, the values of the seekbar are set where the user left it. I would like to reset the seekbar when the user comes back to the seekbar activity. How can I achieve it? Thanks
public void onClick(View v) {
if (seek.getProgress > 0) {
// do something
}
}
simply reset the seek bar in onPause or onResume of your SeekBarActivity, i.e. :
@Override
protected void onPause() {
seek.setProgress(0);
super.onPause();
}
This will be called when you have started another activity and the current one is paused.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With