kivy / kivy/python-for-android
Request: Add option to require manual dismiss of loadingscreen
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 2k
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 9
Description
### 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.
Contributor guide
Research direction
Start at the Android loadingscreen module and the build-option handling for the SDL2 bootstrap. Trace how loadingscreen.hide_loading_screen() currently dismisses the splash and how startup timeout behavior is configured. Done means an option keeps the loading screen visible until explicit dismissal while retaining a failsafe timeout, with the requested behavior covered by tests or documented verification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, python
- Domain
- build-system, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100