Skip to content

Instantly share code, notes, and snippets.

@talhahasanzia
Created November 4, 2016 11:22
Show Gist options
  • Save talhahasanzia/5cb870366597ce699dd2f7658c9ca429 to your computer and use it in GitHub Desktop.
Save talhahasanzia/5cb870366597ce699dd2f7658c9ca429 to your computer and use it in GitHub Desktop.
Delayed thread example
Handler handler = new Handler();
// run a thread after 2 seconds to start the home screen
handler.postDelayed(new Runnable() {
@Override
public void run() {
//code written here will execute after 2000ms(2 seconds)
}, 2000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment