android - Splash Screen while onCreate ends -
my app has 2 activities. first 1 login, sec 1 started when login of first 1 succeded. since sec activity has save on db facebook friends , set them in order within list view, black screen passing first activity second.... can do? correctto set spalsh screen between them? if so, how can stop splashscreen when on create of sec activity has finished? give thanks much
no using splash screen won't idea. improve approach have asynctask
. in onpreexecute()
method start progress bar, time consuming code within doinbackground()
method , within onpostexecute()
method dismiss progress bar , start sec activity through intent
.
new asynctask<void, void, void>() { @override protected void onpreexecute() { // start progress bar here }; @override protected void doinbackground(void... params) { // time consuming code here homecoming null; } @override protected void onpostexecute(void result) { super.onpostexecute(result); // dismiss progress bar here // start sec activity } }.execute();
android splash-screen
No comments:
Post a Comment