Reputation: 7755
I want to start activity B
from A
But B
takes quite some time to initialize
So I want to delay switching the view until B
is ready.
Is there a way to start an invisible activity B
and then make it visible when ready?
Upvotes: 0
Views: 1055
Reputation: 27549
Why don't you just try using AsyncTask. You can follow below steps !!
1) start Activity B , show a progressBar that can say "Screen is loading".
2) Load your screen into AsyncTask.
3) And when it is done remove the progress bar/dialog and show the screen, it is very Simple.
Upvotes: 1
Reputation: 4147
Start a background thread (AsyncTask for example) from activity A that it will do the initialization. When the AsyncTask finishes, start activity B.
Upvotes: 0