Splash screen for Desktop application

638 views
Skip to first unread message

Diogo Silva

unread,
Apr 26, 2016, 3:56:58 PM4/26/16
to Kivy users support
Hi,

I am trying to create a splash screen while my desktop application is loading but with no success so far. All I get is a black window while the app is loading. 

All the information I've gathered  on the web was related to android applications and I'm not sure how to proceed in this case.

 Is there a way to do this in a desktop application for Linux/Windows?

Thank you for your attention.

Cheers,
Diogo

Graham Comerford

unread,
Apr 27, 2016, 6:28:23 AM4/27/16
to Kivy users support
I dont think this is the best solution but I have been doing it like this:

Main widget in python with numeric property "splash":

class MyMain(BoxLayout):
    splash= NumericProperty(1)


Main widget in Kivy:

<MyMain>:
    canvas.after:
        Color:
            rgba: (1, 1, 1, self.splash)
        Rectangle:
            pos: self.pos
            size: self.size
            source: 'splash.png'

The splash image will cover your widget while it loads.
When loading is complete set self.splash=0 which will make the image transparent to reveal your interface

Diogo Silva

unread,
Apr 27, 2016, 6:46:04 AM4/27/16
to Kivy users support
Thanks for the (creative) suggestion. However, I already have set a background in the main widget using canvas.before and the background appears at the same time as the rest of the interface. I am not sure if tweaking my app  will completely solve the issue because, at least in my system, the build() function is not called until 2-3 seconds after executing the application. And then there's an additional 1-2 seconds while the app loads. It seems like something that must be done internally in kivy even before calling build()?

Mark Melvin

unread,
Apr 27, 2016, 8:30:17 AM4/27/16
to Kivy users support
Have you tried setting "presplash.filename" in your buildozer spec file?  I'm not sure if this is platform-neutral in Kivy, or if it only works on Android.  I have never tried it - just saw it there.

Mark.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Diogo Silva

unread,
Apr 27, 2016, 10:16:12 AM4/27/16
to Kivy users support
I am not using buildozer (as far as I know buildozer is intended to package applications for mobile and my app is for desktop only). I'm running the app from source or from the executables created using pyinstaller. In these cases I'm not aware of an option similar to the presplash.filename...

Diogo

pessoade...@gmail.com

unread,
Apr 30, 2019, 5:02:18 PM4/30/19
to Kivy users support
Olá Diogo ! Conseguiu resolver o seu problema ? Tenho a mesma dúvida...
Reply all
Reply to author
Forward
0 new messages