问题描述
当我在手机上启动我的应用程序(基于 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 闪屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)