Skip to content

Instantly share code, notes, and snippets.

@gitssk
Created October 15, 2012 12:32
Show Gist options
  • Save gitssk/3892219 to your computer and use it in GitHub Desktop.
Save gitssk/3892219 to your computer and use it in GitHub Desktop.
Android - Time based Activity Change - 1
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
finish();
Intent intent = new Intent(MainActivity.this, MenuActivity.class);
MainActivity.this.startActivity(intent);
}
}, 2000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment