You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As explained on kivy#465, the previous approach (pure GL, or using window background) doesn't fully work.
This approach have a tiny delay until PythonActivity.onCreate is called.
It first display an ImageView fitted on the screen.
Once SDL is loaded (and that SDL put its own layout), we put again our ImageView.
The tricky part is when to remove.
On the previous python-for-android+kivy, kivy was explicitely saying that he's ready to receive event. And that's where we knew the loading screen could be removed.
Here, there is no absolute way to do it, as SDL itself on the java part doesn't provide any callback... except pollInputDevices()
This method is called each X seconds, to check if any joystick has been plugged or not.
The PR add a keepActive() method that is overrided in PythonActivity to remove the screen.
It wait for the second call of it before removing the loading screen:
1. the first call is done right after the creation of the SDL window in C code. (In kivy, it's just the start, after that we load the app, widgets etc... it can take a long time)
2. the second call is done (at least on kivy) after the first frame rendered.
The loading screen might be displayed more than needed (pure SDL2 game // very fast loading). In any case,
we can always force to remove the loading screen with:
PythonActivity.mActivity.removeLoadingScreen()
If anybody have another good approach, feel free :)
Closeskivy#465
0 commit comments