How to perform a specific action on the expiration of a given timer? In general, you need to show the dialogue after 3 seconds

Closed due to the fact that the issue is too common for Kromster , HamSter , Streletz , rjhdby , aleksandr barakin participants on Oct 13 '16 at 10:20 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Depends on the implementation of your timer. - post_zeew
  • @post_zeew, wrote above - turok09
  • Possible duplicate question: The timer in the Android application - aleksandr barakin

1 answer 1

For example, you can start a stream and make the necessary delay:

new Thread(new Runnable() { public void run(){ try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } // действия после задержки } }).start();