Remove or replace the kivy splash screen on startup(移除或更换启动时的 kivy 闪屏)
问题描述
当我在手机上启动我的应用程序(基于 kivy)时,有 1 到 2 秒的时间显示初始屏幕,显示正在加载...",然后主窗口才可见.
When I launch my app (based on kivy) on my phone, there is 1 ~ 2 seconds showing the splash screen, says 'Loading...', before the main window becomes visible.
如何在代码(main.py)或配置中的某处删除它(我发现没有与此相关的配置(kivy.config)?这似乎与OpenGL或pygame有关?
How can I remove this in the code(main.py) or somewhere in the config(I found no config related to this(kivy.config)? Does this seems to related to OpenGL or pygame?
推荐答案
这个屏幕是python-for-android进程的一部分,不是你可以在你的kivy应用中直接修改的.
This screen is part of the python-for-android process, not something you can directly modify in your kivy app.
正如您所评论的,您可以使用 build.py 的 --presplash 选项更改显示的图像.如果使用 buildozer,您将改为在 buildozer.spec 文件中设置 presplash.filename 标记.
As you commented, you can change what image is displayed with the --presplash option for build.py. If using buildozer, you would instead set the presplash.filename token in your buildozer.spec file.
也许可以通过深入研究 python-for-android 以某种方式修改该过程,但我从未见过这种讨论,而且我对您是否可以做出任何真正的改变知之甚少.问题是在 java 应用程序初始化和 python/kivy 应用程序准备好显示任何东西之间,一些加载时间是必不可少的.据我所知,您可以在 python 文件中做的最好的事情是在 build 方法中执行尽可能少的计算.
It might be possible to modify the process somehow by delving into python-for-android, but I've never seen this discussed and I have very little idea of whether there are any real changes you can make. The problem is that some loading period is essential in between the java app initialising and the python/kivy app being ready do display anything. As far as I know, the best you can do in your python file is to perform as little computation as possible in your build method.
这篇关于移除或更换启动时的 kivy 闪屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:移除或更换启动时的 kivy 闪屏
基础教程推荐
- 在 Android 模拟器中激活网络位置提供程序? 2022-01-01
- 在 iOS8 中无法获得正确的键盘高度值 2022-01-01
- 我的 UIImageView 的任务 2022-01-01
- 可可/目标C(OSX不是iOS)从子对象访问父对象 2022-01-01
- 突出显示朗读文本(在 iPhone 的故事书类型应用程序中) 2022-01-01
- - (CGRect)convertRect:(CGRect)rect toView:(UIView *)view 如何工作 2022-01-01
- 新的@SystemApi 注解是什么意思,和@hide 有什么区别 2022-01-01
- Android:STATE_SELECTED不工作 2022-01-01
- 在 appComponent dagger 2 中动态添加测试模块? 2022-01-01
- 如何将多个组件添加到 PickerView? 2022-01-01
