9

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
  • I found --presplash in the build.py's options. this could be used to replace the default picture.
    – schemacs
    Jan 11, 2014 at 2:05

3 Answers 3

16

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.

2
  • 1
    Yes, I agree with you. But the startup time is a bit too long compared with java apps.
    – schemacs
    Jan 11, 2014 at 15:11
  • 4
    I agree startup time can be a bit annoying. One useful thing (maybe you already did it) is to really make sure your build method doesn't do much, and try to construct as much state as possible only after that. If you can display a simple widget quickly then add the others that can make a big responsiveness difference.
    – inclement
    Jan 11, 2014 at 15:36
6
# (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
0

If you don't want to have anything appear during the presplash loading period you can add an empty transparent png image the way it is specified above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.