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

Kivy - Show/hide Rectangle depending on result of If statement

I have an "email" text box that receives user input and then evaluates whether or not it's a valid email. I want to show a red rectangle around the text box if the email is invalid, and hide it if the opposite is true. I already have the rectangle…
Knaque
  • 57
  • 8
2
votes
3 answers

Changing primary palette color, when using KivyMD, has no effect on buttons

So I'm trying to build an app using Kivy and, recently, I learned about KivyMD but got stuck. When I change primary palette color it stays blue for every button, but changes for MDDropDownMenu. I tried using it both before and in build method, and…
Kojimba
  • 83
  • 1
  • 8
2
votes
1 answer

Python/Kivy - Sending variables from one class to another

I'm not that new to Python so I have a basic understanding but I wouldn't say that I'm all that great either. I've been having a tonne of problems with a brazilian jiujitsu app that I'm trying to make in Kivy. I am trying to get the text from a…
2
votes
1 answer

How to reference widgets of different screens created in kivy using kv language?

My app consists of 2 screens: Screen 1 - 1 textinput widget and 1 button widget Screen 2 - 1 textinput widget On button press I want to capture the data entered in the textinput of Screen1 and print it in textinput of Screen2. I have tried the…
Pavan
  • 381
  • 1
  • 4
  • 19
2
votes
2 answers

Why am I getting a Kivy KeyError: with my code?

I'm trying to create a simple login and for the next screen to show the current time, but I just don't understand why I keep getting this error. *.py file from kivy.app import App from datetime import datetime from datetime import timedelta from…
primitiveProgrammer
  • 151
  • 1
  • 1
  • 12
2
votes
1 answer

Why kivy is not updating the position of widgets when pos_hint is changed Programmatically?

I want to build a screen where on following button press changes happens on label's size and position: Button : Changes x++ -> x co-ordinate of label increments by 0.1 in pos_hint property x-- -> x co-ordinate of label decrements by 0.1 in…
Yash Patel
  • 125
  • 8
2
votes
1 answer

Why changing pos_hint property not changing the position of widget at runtime?

I am creating buttons which on_press does the movement of another button. This is view of it... I can't post image but i have given link I am changing pos_hint property on button events but the widget is not moving according to it. Actually it is…
Yash Patel
  • 125
  • 8
2
votes
1 answer

How to implement for loop in .kv file

I have written a python code in python file(main.py) to create a kivy app that contains dynamically created labels which works fine. Here is main.py file main.py from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout…
Pavan
  • 381
  • 1
  • 4
  • 19
2
votes
2 answers

Center of Canvas in Python vs kivy language

I have made an easy app where i try to show my issue. When using python to draw a line in kivy (using the with self.canvas method) the line gets drawn from a center_x and center_y of 50. Using kivy Lang draws the line correctly in the center. Here…
Øyvind
  • 139
  • 2
  • 9
2
votes
1 answer

Updating Kivy Widgets when Root Object Changes

I have a data structure in the form of an object that I am representing graphically using Kivy. If possible, I would like to write it so that when the root object is changed, the widgets in Kivy reflect the change. So far what I've noticed is that…
Will
  • 23
  • 2
2
votes
0 answers

Why can't kivy TextInput instance not be referenced from root class?

I have a TextInput that is added to a kivy language : rule and declared as a python class that inherits from a BoxLayout. The above rule is then added to a ModalView along with some buttons when another button is clicked. The main…
Hmerman6006
  • 1,622
  • 1
  • 20
  • 45
2
votes
1 answer

Changing text of 2 buttons from MDDropdownMenu in KivyMD

I have problems with changing button text on 2 different buttons after clicking on the MDMenuItem from MDDropdownMenu - there is only one button can change self text. Each button have to change the text separately. In that case - two buttons, two…
2
votes
1 answer

How to set an icon in Kivy?

I want to set my own icon in my kivy app, but its not working. I have tried both with icon.ico and icon.png. This is what i have tried: class MyApp(App): def build(self): self.icon = 'myicon.png' and: from kivy.config import…
Nick
  • 57
  • 1
  • 7
2
votes
1 answer

KivyMD UI and animations are slow and laggy on Android

I'm working with KivyMD. The UI is so slow. Animations are so slow and often stuck. Even in the Kitchen Sink example. Although it's fine on my Windows and Linux. The problem is after building package for android. This is exactly my question and the…
Sina
  • 21
  • 4
2
votes
1 answer

How do I fix ' ValueError: callback must be a callable, got None' on schedule Kivy.clock callback function?

I have a function that uses the plyer.facades.Wifi library to check the wifi status. The function changes a BooleanProperty variable is_wifi to True or False depending on the status of the wifi. The BooleanProperty variable is binded in the…
Hmerman6006
  • 1,622
  • 1
  • 20
  • 45