Harsh
Harsh

Reputation: 487

Splash screen between two activities

I want to show a splash screen between my first and second activity. Both the activities make use of AsyncTask. First being a simple login screen retrieving data for the whole app and second loads the activity specific data. Currently, both the activities have their own ProgressDialogs which is quite naive but they were developed individually and then I wasn’t planning to put them one after the other.

I tried to implement the splash screen only replace a loading process from one activity. But, in order to place a splash screen in between them do I have to transfer all the loading process to a single activity? Which activity should contain the code for the splash screen? I basically want to replace two ProgressDialogs by a single splash screen. What should I do?

Upvotes: 0

Views: 993

Answers (1)

Joshua W
Joshua W

Reputation: 4983

I think the simplest way would just make a transitional activity that displays a splash screen, preloads the data for the next activity, then launches the next activity.

Activity A loads Activity B which shows the splash screen while simultaneously running the AsyncTask. Once the AsyncTask completes load Activity C.

I hope I understand your question correctly :-)

Upvotes: 0

Related Questions