Skip to content

Instantly share code, notes, and snippets.

@gitssk
Created October 15, 2012 12:34
Show Gist options
  • Save gitssk/3892231 to your computer and use it in GitHub Desktop.
Save gitssk/3892231 to your computer and use it in GitHub Desktop.
Android - Time based Activity Change
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Thread thread = new Thread() {
public void run() {
try {
Thread.sleep(3*1000);
} catch (Exception e) {}
finish();
Intent intent = new Intent(MainActivity.this, MenuActivity.class);
MainActivity.this.startActivity(intent);
}
};
thread.start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment