Questions tagged [kivy-language]

A language created and used in the Kivy framework to describe a widget structure of a project.

Kivy language (kv, kvlang) is a language created and used in the Kivy framework to describe a widget structure of a project.

The concept behind kv is to make maintaining mainly the design part of an application simple. Kv provides features that make building an application easy and readable in large projects:

With these features kv allows very fast prototyping and agile changes to User Interface. It also facilitates a good separation between the logic of an application and its UI, therefore provides possibilities to minimize code size and maximize readability.

For real-time debugging of the kv code you can use KivyCatalog.

2724 questions
2
votes
1 answer

How can I use one MDTopAppBar across multiple Screens in MDScreenManager?

I am developing an app in KivyMD for Python and I'm having trouble implementing a single MDTopAppBar for multiple screens. Here's my current code: from kivymd.app import MDApp from kivy.lang import Builder from kivymd.uix.screenmanager import…
2
votes
1 answer

Is there support for Light and Condensed Fonts in Kivy?

Just a quick question that might be obvious (sorry in advance!), does Kivy have support for Light and Condensed fonts? I'm aware that Kivy has markup for things such as italics and bold, however is there something that allows you to render light or…
Chene
  • 21
  • 4
2
votes
1 answer

How to press and drag to select a group of ToggleButtons with Kivy?

I am hoping to implement some drag-select functionality to a grid of buttons in a GUI. I want to achieve something similar to a drag selection box on desktop operating systems. One press and drag should be able to toggle a group of toggle buttons of…
Ham789
  • 99
  • 2
  • 7
2
votes
0 answers

Get image source from a different path in kivy file

I want to get an image source code from a deferent path. In my project .KV located at: LearnProject/lib/screens/home.kv And image file located at: LearnProject/assets/images/logo.png How can I get logo.png from home.kv?
2
votes
0 answers

How to change text on button with pressing of different button without use of 'self' instance

I need your help on this. class SwimMenu(Screen): wDiscard = "discard" def falsify1(self): global really really = False self.parent.remove_widget(self) #here I need to change text on discard…
2
votes
0 answers

Kivy button does not dismiss a popup when it should

I have made a button that when released opens a popup in kivy, which contains a Float Layout. I want the layout to contain a filechooser, so the user can select a folder to save something, and a button that saves this choice and closes the…
2
votes
1 answer

KivyMD widgets displaying at the bottom of page in MDBoxLayout

KivyMD widgets are displayed at the bottom when using MDBoxLayout. I remember two MDTextField widgets and one MDRaisedButton, but they are located at the bottom. When using Kivy without KivyMD, there is no such problem. Here is my code: from…
LapisMYT
  • 51
  • 5
2
votes
1 answer

How to scale KivyMD application

I am new to Kivy and unsure of how to scale the screen so that if being viewed on a mobile phone or not in full screen, the application scales down to the correct viewing size. I have added screenshots of what the application currently looks like in…
Ewan
  • 109
  • 7
2
votes
1 answer

How to set kivy font size inside a label or a button so it fill the label or the button even the label or the button size changes

I am trying to build an application with buttons (similar to the calculator), everything was good until I tries to make the app window thinner, the text go out the borders of the button. I tried font_size: self.width/5 to change the font with the…
2
votes
1 answer

How do I access a variable from my main.py in my .kv file

from kivy.app import App from kivy.uix.widget import Widget from kivy.core.window import Window from kivy.uix.label import Label Balance = 0 Balance_string = str(Balance) class MyWidget(Widget): def ads(self): global Balance …
2
votes
0 answers

Make a call with your application in python3 kivy

Hi does anyone know how to make a function to call a phone number using intents in kivy? Thank you in advance. Here is an attempt of mine to do this exact thing, is it right or do I have to add something else? from jnius import autoclass Intent =…
mss051
  • 93
  • 9
2
votes
1 answer

Adding ScrollView in MDCard Kivy

I am trying to add ScrollView in my First Screen but unfortunately I failed to do so. I have tried many times by changing layouts, adding new layout etc etc.. I just want is to ScrollView to those ElementCard so that if I add more I can reach then…
Ayush Raj
  • 37
  • 4
2
votes
1 answer

Kivy AttributeError: 'super' object has no attribute '__getattr__' error

I'm trying to make a game in kivy and I'm facing an issue. Whenever I click on my "start game" button on my gamescreen it says line 46, in move_ball ball = self.root.ids.ball File "kivy\properties.pyx", line 864, in…
Tan
  • 43
  • 2
  • 6
2
votes
1 answer

how do I select directories and files in KivyMD

I am trying to select a file (picture), through a simple app I made using file manager, but I keep getting this error message: kivy.uix.widget.WidgetException: Cannot add
Edwin
  • 565
  • 11
  • 26
2
votes
0 answers

Unable to find loader for audio file (ffpyplayer) - kivy, android, buildozer

I had a music player app built with kivy and ffpyplayer as its audio provider. Before deploying the program on android, I just wanted to do some testing. Everything seemed to be fine, except the core thing that was supposed to work which was playing…
Omid Ketabollahi
  • 154
  • 2
  • 13