Questions tagged [kivy]

1

votes
1

answer
761

Views

Kivy: TextInput border radius

I would like to know if it was possible in python & Kivy, to customize TextInput widgets like in HTML/CSS. Is there any way to do that directly into my CustomTextInput(TextInput) class ? I want my TextInput looks like this:
Mike Delta
0

votes
0

answer
5

Views

Kivy - KeyError for ScreenManager

(Do not mark as duplicate, other similar questions do not answer my specific question) I am attempting to use change screens in my app with a function I defined as change_screens. In my kv file, my screen manager has an id of screen_manager. When I attempt to get the id in my python code in the func...
LearningtoCodee
0

votes
0

answer
7

Views

buildozer - kivy+gspread+oauth2client app crashes on start

After installing modules, I followed instructions to build an apk file. My app uses gspread and oauth2client. Put all the requirements in the buildozer.spec file. I run buildozer android debug deploy run logcat then the application crash after loading screen. The first thing I think the problem is...
DrCreampuff
1

votes
2

answer
685

Views

Error with Kivy Login screen and popup

I want to make a login page which accepts username and password. Upon validation of both a popup message should be displayed showing the message: "Login successful " or else show the popup message "Login failed". I tried doing it but I don't know where I went wrong. Any help would be much appreciate...
AS15
1

votes
1

answer
1.1k

Views

Select next / previous Kivy RecycleView row on button press

I am developing a Kivy media player and using the RecycleView to display my media list. What I am attempting to achieve is to change the existing row selection to either the next or previous row in the RecycleView list from a button selection. I can see the LayoutSelectionBehavior class looks like t...
campervancoder
1

votes
1

answer
112

Views

AttributeError: 'MainRouter' object has no attribute '_disabled_count'

I am creating a kivy app where I have used router showing this error- AttributeError: 'MainRouter' object has no attribute '_disabled_count' Any solution?
zeroFighter
1

votes
2

answer
935

Views

Is there a simple way to add a border to Kivy Buttons

I am using python-2.7 and kivy. Can someone tell me that how to add a different colour border to kivy button. test.py from kivy.uix.screenmanager import Screen from kivy.app import App from kivy.core.window import Window Window.clearcolor = (0.5, 0.5, 0.5, 1) Window.size = (300, 100) class User(Scr...
Martin
1

votes
2

answer
70

Views

Concatenate variable in python

I made a variable colonne which returns the number of the column. I'm trying to put it in the selection of my function like that: self.ids.image+colonne+_1 here is my complete view: Button: on_press: root.click_colonne(1) pos: 25,25 size: 100, 500 opacity:0 Image: source: 'image.png' pos: 0,0 size:...
Antoine553
1

votes
4

answer
4.5k

Views

How to change background color of button on press in kivy?

My app has a single button with a default background color. I just want to change its background color to another color on on_press event. You may consider it similar to visited and non-visited hyperlinks of html ie when a linked is clicked, it changes its color. My attempt: #!/usr/bin/kivy import k...
1

votes
1

answer
1.3k

Views

file handling in kivy

I am using kivy for android application. Currently I am working on a small game...the problem arises when I want to store the highest score in a file.... I am using python's open and readline and writelines but I am always getting the same error "NO SUCH FILE OR DIRECTORY FOUND 'score.txt'" but I h...
adil
1

votes
1

answer
2.1k

Views

OpenGL application fails on my mac, runs on virtualbox

I have a macbook pro with AMD Radeon graphics card and mountain lion 10.8.3 installed. I am trying to access an OpenGL application (made using kivy on python) residing on an ubuntu 12.04.1 machine by using ssh from my mac. The application quits saying that the minimum OpenGL version required for ru...
user2103008
1

votes
3

answer
1.4k

Views

How to unbind a property automatically binded in Kivy language?

The Kivy Language automatically creates internal binds in properties. For example, if we assign the position of the parent to the position of the child, then the position of the child is going to be updated automatically: Widget: Label: pos: self.parent.pos In this case, if we move the parent Widget...
toto_tico
1

votes
2

answer
3.3k

Views

Centering multi-line Button or Label text in kivy?

In kivy, how do you go about creating Buttons or Labels with multiple lines of text which are automatically centered? If you do something like, Button(text = 'my button\nthis is my button'), it seems that only one of the lines will be centered, while the other line will be off-center. Thanks.
James_L
1

votes
1

answer
5.5k

Views

Kivy ActionBar example

I was trying to find an example of the ActionBar in Kivy, but was unable to find one. I tried adding it in the kv language with the below: : ActionBar: But I get an error the module was not found in the stack trace. Does anyone know of an ActionBar example or can anyone clarify what I am doing wron...
sjensen85
1

votes
1

answer
695

Views

Run Kivy App and still see the Battery and time and other icons

Is there a way to run a Kivy application on Android (whether from Kivy launcher or compiled to a stand alone application) and still see the battery, carrier signal, wifi signal, notification icons...
toufikovich
1

votes
1

answer
2.1k

Views

Building Dropdowns Dynamically in Kivy

I'd like to create dropdown-lists in kivy based on a dictionary property of a class. But something about creating these in a loop is either confusing Kivy or I am just confused. Here's what I have: for main, ingrediants in self.ingrediants.items(): print main, ingrediants dropdown = DropDown() for i...
aeikenberry
1

votes
1

answer
1k

Views

AnchorLayout not centering in Kivy

Following up on a question I asked about background canvases here, to make a nested layout described here, I have an AnchorLayout background that I'm nesting a relative layout on to form a margin around a fixed size internal float. However, my nested widget is not centering inside my AnchorLayout,...
Mittenchops
1

votes
1

answer
2.1k

Views

Update widgets after specified time

I cannot understand how to update kivy screen. This is my python file: import kivy kivy.require('1.1.1') from kivy.app import App from kivy.uix.widget import Widget import time class PongGame(Widget): labe = ObjectProperty(None) def settext(self,x): self.labe.text = str(x) print "DONE" class PongAp...
user3175817
1

votes
2

answer
388

Views

Combining Kivy, Python and Aptana

I've been using and learning Python 3.3 for a while, with the Aptana IDE for Windows. After some issues I've now managed to install a Kivy-package. The only way I can manage to run programs with Kivy, however, is to run the .py-files from the file manager (after assigning .py-files to Kivy). When t...
Enthuziast
1

votes
1

answer
2.3k

Views

kivy: The module raised an important error: “Couldn't find matching GLX visual”

I have Ubuntu 14.04 (Trusty) installed on the beaglebone back. I am connected to my beaglebone black through a vnc session like this: On Beaglebone: vncserver :1 -geometry 1024x768 -depth 24 Here is the Xorg config on beagle bone: Section "Monitor" Identifier "Builtin Default Monitor" EndSecti...
user3304297
1

votes
2

answer
4k

Views

Logs Generated when launching an App in Kivy Launcher on Android

I know we can launch an app in Android using Kivy launcher for android https://play.google.com/store/apps/details?id=org.kivy.pygame and i can launch apps by the same as well . But i need to know how and where can we see the logs generated by the app in it ? For example if i run kivy app on my deskt...
paarth batra
1

votes
1

answer
2.5k

Views

Invalid data after declaration in Kivy

I don't understand why I have this type of error when I run my code. I've checked this several times and everything seems to be good, still the code does not want to run. Here's my __main__.py file : from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.anchorlayout import...
hacks4life
1

votes
1

answer
753

Views

kv Language id linked with another class Object as ObjectProperty kivy

I am trying to update a label text from another class using its update method in Clock but I couldn't understand why its not updating the label properly .I have a sample code below : gui_v9 = ''' #:import Clock kivy.clock.Clock : on_enter: self.EnterLevel_1() : time_Label: timelabel GridLayout: rows...
paarth batra
1

votes
1

answer
3.1k

Views

Create an APK for Android from a kivy/python program [duplicate]

This question already has an answer here: Kivy to Apk in Windows 1 answer How can I create an APK for Android, on Windows, from a kivy & python program? I cannot seem to find a suitable, easy-to-understand tutorial. How would I do this?
rtharper
1

votes
2

answer
1.6k

Views

see output of print statements on android using kivy - kivy launcher

I have created a program which print some instructions on stdoutput while running . I can see them when i execute the app on windows however when i run same app on android device Samsung S3 I could not see output of print statements any where . Sometimes we can see .kivy directory on the device in t...
paarth batra
1

votes
1

answer
534

Views

Non editable text in Kivy

I am creating a registration form using Kivy. I wants the text in textboxes, which is present when form loads as non-editable. As can be seen from below I can edit "Name" field as "Na". I want that user entering name cannot do a backspace and remove "Name". This is my code: from kivy.app import App...
Abhishek dot py
1

votes
1

answer
2.7k

Views

request url using kivy

I want to get some data from app writen in django, using kivy, django server is on 127.0.0.1:8000. I cant see any messages and the result is None, my request script is from kivy.network.urlrequest import UrlRequest import urllib def success(req, result): print 'ok' def fail(req, result): print 'fail...
strz
1

votes
1

answer
876

Views

Kivy standalone android apk on windows

I've been learning Kivy and how to create Android apps. My question is, is there a way to compile a kivy made app as a standalone apk on windows? Something similiar to buildozer for linux? I'm wanting to create an app that I will be releasing on the Google and Amazon app stores. I've been using Kivy...
Syperus
1

votes
1

answer
726

Views

How to hide/disable close button or at least catch/override built-in quit() function? (Kivy)

I need to do some actions before quit (save settings, etc.), I do it with Button widgets, but if I press on close button of the window, it just closes. Maybe I should handle App's on_close() event somehow? Then I don't know how to send data from Layout to App. For now I have smth like: def quit_game...
Necronomicron
1

votes
3

answer
846

Views

How to connect to kivy-remote-shell?

This seems to be a dumb question, but how do I ssh into the kivy-remote-shell? I'm trying to use buildozer and seem to be able to get the application built and deployed with the command, buildozer -v android debug deploy run, which ends with the application being pushed, and displayed on my android...
monkut
1

votes
2

answer
1.6k

Views

kivy: how to make an image act like a button

I'm new to Kivy. I want an image to change into a different one when it is pressed (touched). There should be some easy way of doing this but I can't figur out what. Image: id: "11" center_x: root.width / 2 - root.height * 1/5 * 1.5 center_y: root.height * 1/5 size: root.height / 6, root.height /...
Mariusz
1

votes
1

answer
3.5k

Views

adding widgets in kivy

I am trying to construct a widget in the middle of the screen. I am not using pos_hint or size_hint because I will be altering the widget's position later but when I construct the widget, its size and position is not correct. Here is my code: from kivy.app import App from kivy.core.window import Wi...
Richard Morales
1

votes
1

answer
206

Views

Kivy on Android: Keep Kivy clock running even when app is minimized

My Android app contains a timer using Kivy's Clock function. I want the timer to keep ticking even when the app has been minimized by pressing the home button. The on_pause method is not what I'm looking for as the timer continues where it left off when you minimized the app. Any help is appreciated...
kitch6041
1

votes
1

answer
161

Views

Kivy app works on Windows 7 but not on ubuntu

I have a kivy app that uses a kv file, main.py, and a py class that handles the database. Everything works fine in windows. When I run linux (ubuntu) I get a black window with the correct title, but there are no widgets in the window. What do I need to do different to run a kivy app, that was put t...
CFIT
1

votes
1

answer
475

Views

How to change draw order of already created widgets?

Working with kivy, I can't figure out how to change the draw order of widget that have already been created. This simple app draws two images on the screen and what I want it to do is swap the draw order on every mouse click (move them "totop"). I have been playing with InstructionGroup but it did n...
Daniel
1

votes
1

answer
1.2k

Views

Kivy Switch on_active

I want to use a Kivy Switch to turn something on/off. I am trying to stick with: http://kivy.org/docs/api-kivy.uix.switch.html , but there is no .kv example. I have the following code, abstracted to the problem. main.py: def PID_an_aus(self, instance, value): if value is True: do something else: do...
Holzroller
1

votes
2

answer
1.4k

Views

How to fix aspect ratio of a kivy game?

I've started playing with Kivy, but I'm rather new to all this and am already struggling. I'm trying to make a board game - I want the window to be resizeable, but I don't want resizing the window to mess up the aspect ratio of the game (so in other words, I want the window to have black bars above...
Soul Reaver
1

votes
1

answer
2.8k

Views

Kivy VideoPlayer fullscreen, loop, and hide controls

I'm just starting out with Kivy, so please point out if I'm doing something wrong.. I'm trying to work with the video player. Namely, I can't seem to get it to recognize any "options", and I'd really like a way to hide the controls (to prevent the user from stopping/pausing/changing volume/interact...
Cyclonus
1

votes
1

answer
485

Views

How to remove kivy loading section?

When running a kivy app, it shows kivy icon and string "loading". If its possible, I wanna remove it or change the icon. Can you tell me how to remove it?
1

votes
1

answer
1.1k

Views

How to change opacity when pressing buttons on kivy

how does one change the opacity of the randomly thrown image when the buttons are clicked? (using kivy). from random import randint from random import random from kivy.app import App from kivy.uix.button import Button from kivy.uix.widget import Widget from kivy.graphics import Color, Line, Rectan...
Cube_tbh

View additional questions