Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove or replace the kivy splash screen on startup

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?

like image 916
schemacs Avatar asked Jan 11 '14 01:01

schemacs


2 Answers

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.

like image 174
inclement Avatar answered Oct 31 '22 22:10

inclement


# (str) Presplash of the application
presplash.filename = %(source.dir)s/Blue.png

This is the change you need to make in buildozer.spec file "Blue.png" is the image that I wanted to display

You can also set the presplash color(you better set any one) as follows

# (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
like image 40
inish d souza Avatar answered Oct 31 '22 22:10

inish d souza