android - How to set delay between main activity and a new activity -


i want welcome screen appear , after delay of few seconds start new activity. ex. have mainactivity.java , second activity.java. main activity displays welcome message , second activity work. using intent start second activity main. main not start instead directly second loaded. help!!!

use handler example

private handler handler; private runnable delayrunnable;  handler = new handler(); delayrunnable = new runnable() {       @override      public void run() {     // todo auto-generated method stub               add intent here second activity            intent = new intent(getapplicationcontext(), secondactivity.class);              startactivity(i);     } };       handler.postdelayed(delayrunnable, 3000); 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -