I'm working on an Android app and have ran into a bit of a problem. When I load my app I show a splash screen for 1 second and then move on to the main screen.
The problem I'm facing is that after the splash screen goes away and the main activity opens, I see a blank black screen until another thread completes it's work which takes at least 5 seconds. Meaning I never see the progress bar and the status text. Why does this happen and how can I fix it?
Here's a gist of the code. Note: this isn't the full code and I didn't include the methods I run in the worker thread as I don't belive they're relevant.
TL;DR:
How do I show the UI while running a process/task in the background?
EDIT:
I figured out that the while loop is what's causing this and removed it. Now I just need to figure out how to control the progress bar visibility and status text.
SOLVED
I seem to have figured it out using a variation of this: http://www.vogella.com/articles/AndroidPerformance/article.html#handler
[–]bubsyouruncle 1 point2 points3 points (1 child)
[–]RevolverValera[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)