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); https://stackoverflow.com/questions/65946453/how-to-stop-handler-in-java January 29, 2021 at 07:02AM
没有评论:
发表评论