Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Add option to require manual dismiss of loadingscreen #2981

Open
MrBillium opened this issue Feb 29, 2024 · 0 comments
Open

Request: Add option to require manual dismiss of loadingscreen #2981

MrBillium opened this issue Feb 29, 2024 · 0 comments

Comments

@MrBillium
Copy link

Description

Users can suffer from a black screen on startup because their app starts slowly. With code refactoring using lazy loading of screens , this can be reduced but I doubt it can be eliminated for anything beyond 'hello world' using a screen manager ( which can't itself be lazy loaded).

From your API doc below I see there is a way to manually stop 'loadingscreen' which I assume could be my lottie file.....


__

Dismissing the splash screen
With the SDL2 bootstrap, the app's splash screen may be visible longer than necessary (with your app already being loaded) due to a limitation with the way we check if the app has properly started. In this case, the splash screen overlaps the app gui for a short time.

To dismiss the loading screen explicitly in your code, use the android module:_

_

from android import loadingscreen
loadingscreen.hide_loading_screen()

You can call it e.g. using kivy.clock.Clock.schedule_once to run it in the first active frame of your app, or use the app build method.


My problem is the opposite of the above! - the splash screen is dismissed too early, leading to several seconds of black screen.

Request

Add a build option to Require using loadingscreen.hide_loading_screen() to kill the loading screen ( perhaps with a long failsafe timeout of say 60s) . Then I can call the above code in on_enter() of my home screen and perhaps eliminate the black screen no matter how long it takes my code to load since the splash will keep running until my code is ready to stop it.

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

No branches or pull requests

1 participant