Skip to content

Move the unpackFiles step into an AsyncTask#990

Merged
inclement merged 2 commits intokivy:masterfrom
kollivier:loadingscreen_fix
Jan 28, 2017
Merged

Move the unpackFiles step into an AsyncTask#990
inclement merged 2 commits intokivy:masterfrom
kollivier:loadingscreen_fix

Conversation

@kollivier
Copy link
Contributor

Right now the loading screen does not show up until loading is actually pretty much complete because all the loading tasks block the UI thread. As a result, you will see a dark grey gradient background instead of the loading screen. For apps with more data to unpack, this can appear for longer and give the impression the app has hung. This is a fix for Issue #983.

…oading screen while the unpack step is running.
@kollivier
Copy link
Contributor Author

Taking a second look at the code, I think I see why we get the black screen. I was assuming that once the SDL view was loaded, we no longer needed the loading screen, but apparently there's a delay between setting the view and the first actual render. Typically in my own apps I load up my WebView at this point so I didn't notice it. I'm going to run some tests but I bet adding another call to this.setLoadingScreen() right after mActivity.finishLoad() is called should fix it.

@inclement
Copy link
Member

I'm just trying some tests, but this seems to be working now, which is great! Just to check, is it ready to merge as far as you are concerned?

// removed the loading screen. However, we still need it to
// show until the app is ready to render, so pop it back up
// on top of the SDL view.
this.showLoadingScreen();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think this should be mActivity.showLoadingScreen() - I don't know why it worked for me before, but it's crashing now.

@kollivier
Copy link
Contributor Author

kollivier commented Jan 28, 2017 via email

@kollivier
Copy link
Contributor Author

kollivier commented Jan 28, 2017 via email

@inclement inclement merged commit 4b104ba into kivy:master Jan 28, 2017
@inclement
Copy link
Member

Okay, I fixed it locally to test with so I just pushed that. Thanks!

@kollivier
Copy link
Contributor Author

kollivier commented Jan 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants