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
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01