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
Post a Comment