In my application I have created a splash screen type of thing in android. It should remain for 5 seconds. My problem is that how I display another activity automatically af
TimerTask task = new TimerTask() { @Override public void run() { Intent intent = new Intent(SplashScreen.this, MainMenu.class); startActivity(intent); finishscreen(); } }; Timer t = new Timer(); t.schedule(task, 5000);
and
private void finishscreen() { this.finish(); }