sch*_*acs 5 python android kivy
当我在手机上启动我的应用程序(基于kivy)时,在主窗口变为可见之前,有1~2秒显示启动画面,显示"正在加载...".
如何在代码(main.py)或配置中的某个地方删除它(我发现没有与此相关的配置(kivy.config)?这似乎与OpenGL或pygame有关吗?
这个屏幕是python-for-android进程的一部分,而不是你可以在你的kivy应用程序中直接修改的东西.
正如您所评论的那样,您可以使用--presplashbuild.py选项更改显示的图像.如果使用buildozer,则需要presplash.filename在buildozer.spec文件中设置令牌.
也许有可能通过钻研python-for-android以某种方式修改过程,但我从未见过这个讨论过,而且我很少知道你是否可以做出任何真正的改变.问题是在java app初始化和准备好的python/kivy应用程序之间的某些加载期是必不可少的.据我所知,你可以在你的python文件中做的最好的事情是在你的build方法中尽可能少地执行计算.
小智 6
# (str) Presplash of the application
presplash.filename = %(source.dir)s/Blue.png
Run Code Online (Sandbox Code Playgroud)
这是您需要在 buildozer.spec 文件中进行的更改“Blue.png”是我想要显示的图像
您还可以设置 presplash 颜色(最好设置任何一种),如下所示
# (string) Presplash background color (for new android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
android.presplash_color = teal
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4647 次 |
| 最近记录: |