Remove or replace the kivy splash screen on startup

非 Y 不嫁゛ 提交于 2020-01-24 04:10:50

问题


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.

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?


回答1:


This screen is part of the python-for-android process, not something you can directly modify in your kivy app.

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.

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.



来源:https://stackoverflow.com/questions/21057647/remove-or-replace-the-kivy-splash-screen-on-startup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!