Is it possible to stop the handler while counting 6 seconds? That the toast does not appear For example, I want the handler not to work in 3 seconds and the toast not to appear, then go to the second activity in 3 seconds. Thanks for the help friends
final Handler h= new Handler();
h.postDelayed(new Runnable(){
@Override
public void run() {
Toast.makeText(Ab.this, "finish 6 seconds", Toast.LENGTH_SHORT).show();
}
},6000);
question from:https://stackoverflow.com/questions/65946453/how-to-stop-handler-in-java