Skip to content
Advertisement

Tag: kivy

How to stack multi-line labels vertically in BoxLayout

I am trying to create a stack of multiline Labels on Kivy inside a BoxLayout. How do I get the BoxLayout to expand according to its contents? Now the BoxLayout is squeezing the Labels instead. I do not wish to hardcode the multiline Label size as I want each to be flexible to accommodate varying lines of text. My demo

Random list item, but unable to choose the same item twice

Is it possible to run a loop, that chooses a random list item, but is unable to choose the same one twice in a row. I’ve tried running it in a thread and with Clock.schedule_interval Im not sure how to keep the loop and GUI running simultaneously. When the interval goes off, it “resets” the loop. therefore being able to

Missing Recycle View widget

I need to create an autofill app, I have a label and text input on the top, and recycle view on the bottom. However, when I run the program, the recycle view disappears, even though I have set in the string. This app will facilitate searching content by typing the name in the text input and the relevant content will

Python KivyMD- load spinner while waiting for results from a function

I am trying to add an MDSpinner widget while waiting for an external function to return results since it takes a couple of seconds to finish executing. My problem is the spinner isn’t loading when the button is pressed. How can I show a spinner while waiting for a function to return results? my current code looks something like this:

Will the data files be lost when I update my game apk in play store?

First things first, I’m very new to devloping android applications and games, so please bare with my poor knowledge of things. Thanks! So I’m developing a game in kivy, where the data such as money, items, level are started in a seperate py file. Essentially, there is a main.py and a data.py. Now if/when I update my game on play

how to insert a MDList in a MDDialog in kivyMD?

I need to show the data from a dictionary in a ThreeLineListItem inside a MDDialog, but my code doesn’t seem to work. Here’s my code: Do I need to import the values for the MDList from the KV file? Answer You can’t call your MDDialog class like : DialogContent().check_conflicts(product_dict). You need to reach self.dialog.Because you created this with your custom

Kivy ScrollView code error with scrollbars (or bug?)

I’m playing around with a Kivy Scrollview, adding scrollbars, etc, and getting a strange crash. I don’t specifically think it’s a bug, it’s probably some configuration element on Scrollviews that I’m missing, but who knows? Given this code: if I click or touch the Scrollbars in any way, I get this error: However – if I first click the bitmap

KivyMD DatePicker save multiple dates

I want that you can add and choose multiple dates. I tried to send a number with the button click button_nr but I don’t know how I can pass it to the on_save function, so that I can change the self.ids.date_label(button_nr).text . If somebody has a better idea how to save multiple dates I’m open for suggestions. Thank you The

Kivy Error when I close the DatePicker (MultiScreen)

I’m trying to learn Kivy. Most stuff works when I just code it separate. But when I combine like MultiScreen with other code I always strugle. Here I want that after closing the DatePicker to change the Text(id: date_label. Same code worked without the MultiScreen Error: line 31, in on_cancel self.root.ids.date_label.text = “Cancel” AttributeError: ‘CreateScreen’ object has no attribute ‘root’

Advertisement