Questions tagged [kivy]

Kivy is an open source Python library for rapid development of cross-platform applications equipped with novel user interfaces, such as multi-touch apps.

is a library for the development of multi-touch enabled media-rich applications. The aim is to allow for quick and easy interaction design and rapid prototyping while making your code reusable and deployable.

Kivy is written in Python, based on and supports different input devices such as Mouse, Dual Mouse, TUIO, WiiMote, WM_TOUCH, HIDtouch, Apple's products and so on.

Kivy is actively being developed by a community and free to use. It operates on all major platforms (, , , , , ).

The framework contains all the elements for building an application such as:

  • extensive input support for mouse, keyboard, TUIO, and OS-specific multitouch events,
  • a graphics library using only OpenGL ES 2, and based on Vertex Buffer Object and shaders,
  • a wide range of widgets that support multitouch,
  • an intermediate language Kv used to easily design custom widgets.

Kivy is the evolution of the PyMT project, and it is recommended for new projects.

UPDATE:

Kivy now supports Material Designs (inspired from Google) and is available via KivyMD .


icon Kivy Kivy


The main resource for information is the website. In addition, you can also check the Wikipedia entry for Kivy.

13657 questions
12
votes
3 answers

How to disable a widget in Kivy?

I read the Kivy tutorial and couldn't find how to disable a widget (for example, a Button). def foo(self, instance, *args): #... main business logic, and then instance.disable = False # type(instance) = kivy.uix.Button I bind foo with…
Ulrich Von Rekkenin
  • 352
  • 1
  • 3
  • 14
12
votes
3 answers

Combining image and text within a button in kivy

What's the preferred way to combine an image/icon and text within a button? For example, how would you create a button with text = 'my button', and a graphical icon to the left of that text?
James_L
  • 1,225
  • 5
  • 19
  • 26
12
votes
2 answers

Custom syntax highlighting in Geany

I am trying to create custom syntax highlighting for Kivy '.kv' files in the Geany editor. Although the specific filetype seems irrelavant to the issue I'm having, as any efforts I make at getting syntax highlighting to work for a custom filetype…
Adam Gaskins
  • 399
  • 2
  • 3
  • 11
11
votes
3 answers

How to fix 'java.lang.module.FindException: module java.se.ee not found' error when packaging my kivy application with buildozer

I'm trying package my kivy app (python3) but when i run the command buildozer -v android debug see this error # Cwd /home/javier/.buildozer/android/platform/android-sdk Error occurred during initialization of boot…
Javier Valero
  • 113
  • 1
  • 2
  • 7
11
votes
12 answers

Permission Error When Trying to Use PyInstaller

When trying to deploy a Kivy App using PyInstaller, I am getting Permission Denied errors even when using and Administrator CMD. The folder has all open editing options for every user. Python has firewall access. How to fix this? PS…
The Guy
  • 658
  • 1
  • 7
  • 21
11
votes
3 answers

Starting Kivy service on bootup (Android)

I'm trying to start my kivy app's service on bootup. I'm sure that my service is ok because it works when I start my app. But on bootup I have a problem. I've read this article and tried to make it: package net.saband.myapp; import…
Andrzej S.
  • 472
  • 3
  • 19
11
votes
8 answers

Python Kivy: how to call a function on button click?

i'm pretty new at using kivy library. I have an app.py file and an app.kv file , my problem is that I can't call a function on button press. app.py: import kivy from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.button…
Mike Delta
  • 726
  • 2
  • 16
  • 32
11
votes
0 answers

Use OpenCV, cv2.videocapture in Kivy with Android - Python For Android

I have been working for a few days, trying to use cv2.VideoCapture() in python-for-android. I'm using Kivy with buildozer to build apk for Android. Here is my code from kivy.app import App from kivy.uix.image import Image from kivy.clock…
Vajira Prabuddhaka
  • 852
  • 4
  • 13
  • 34
11
votes
2 answers

Update labels in a separate worker (Process instance)

I do have several screens. One of them (DataScreen) contains 8 labels which should show the current sensor values. Sensors are read by a separate process (which is started from the MainScreen). The process itself is an instance of…
Moritz
  • 5,130
  • 10
  • 40
  • 81
11
votes
2 answers

Kivy: compiling to a single executable

Didn't get a response in the kivy forum, so trying here. When I compile the tutorial pong code as a one file executable, I must still include the pong.kv file in the same folder for it to run. Otherwise, I get the following error when launching the…
Raj
  • 221
  • 1
  • 2
  • 10
11
votes
1 answer

Kivy properly set own icon

I have my own icon (KO.png: 512x512 (also got in sizes 48, 72, 96, 144 and 192)) in the same folder as my main.py. I want to set it as a launcher icon (1), in ActionPrevious (2) and loading icon (3). 1) The first step is to put in main.py: def…
NumesSanguis
  • 5,832
  • 6
  • 41
  • 76
11
votes
3 answers

Kivy Spinner: is any event triggered when a value is selected from the Spinner

I introduce a Spinner in my widget, and I want to perform some action every time I chose a different value from it. Is it possible? I only seem to get events on_press and on_release, but they are not triggered when a choice for a different value is…
user2664344
  • 179
  • 2
  • 6
11
votes
1 answer

Kivy to create a Desktop program?

Kivy seems to be very adapted for tablet and phone app , but I wonder how does it scale for a desktop application? Apart from the look (looking at the standard greyish button, the white label on black background...: but these can evidently be…
ThePhi
  • 2,373
  • 3
  • 28
  • 38
11
votes
2 answers

Display numpy/opencv/matplotlib image in Kivy

How to display image in standard numpy/opencv/matplotlib format in Kivy? Kivy uses different image memory layout and I can't figure out which one. The following code works totally fine. Image was captured using cv2 VideoCapture. I think image is…
DikobrAz
  • 3,557
  • 4
  • 35
  • 53
11
votes
2 answers

Why can't I access the Screen.ids?

UPDATE: Ryan P's answer provided the solution. However, I took that solution and changed it up a bit, throwing all of the data that wasn't being properly initialised into the on_enter method of the RootWidget Screen. This has worked…
Totem
  • 7,189
  • 5
  • 39
  • 66