Created
May 10, 2013 06:22
-
-
Save ayushhgoyal/5552710 to your computer and use it in GitHub Desktop.
This snippet can be used to delay the execution of code by certain time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handler handler = new Handler(); | |
handler.postDelayed(new Runnable() { | |
public void run() { | |
//your code here- to be executed after delay | |
} | |
}, 2000); //2000 is 2 seconds here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment