kivy

How to use kivy to open default Android apps?

心不动则不痛 提交于 2021-01-21 11:31:26
问题 I am currently developing an app for Android, and I would like to make it so that when the user clicks on a button within the app, they are redirected to the default Android clock app, where they can set up reminders for themselves. Is there any way that Kivy can access those default apps? 回答1: You probably need to construct an appropriate intent, as described at e.g. Intent to launch the clock application on android , but you can do this from Python via pyjnius instead of by writing java

TypeError: object.__init__() takes exactly one argument (the instance to initialize)

空扰寡人 提交于 2021-01-21 04:06:42
问题 I am trying to make a form app and I don t understand the error: TypeError: object.__init__() takes exactly one argument (the instance to initialize) Code here; class Myapp(App): def build(self): return Grid1() class Grid1(GridLayout): def __init__(self,**kwargs): super(Grid1,self).__init__(**kwargs) self.cols=1 self.inside=GridLayout() self.inside.cols=2 self.inside.add_widget(Label(text="Your name is :")) self.name=TextInput(multiline=False) self.inside.add_widget(self.name) self.inside.add

TypeError: object.__init__() takes exactly one argument (the instance to initialize)

旧街凉风 提交于 2021-01-21 04:04:23
问题 I am trying to make a form app and I don t understand the error: TypeError: object.__init__() takes exactly one argument (the instance to initialize) Code here; class Myapp(App): def build(self): return Grid1() class Grid1(GridLayout): def __init__(self,**kwargs): super(Grid1,self).__init__(**kwargs) self.cols=1 self.inside=GridLayout() self.inside.cols=2 self.inside.add_widget(Label(text="Your name is :")) self.name=TextInput(multiline=False) self.inside.add_widget(self.name) self.inside.add

Pass variables from .py to .kv file

*爱你&永不变心* 提交于 2021-01-20 12:27:27
问题 I am trying to use variables from python file to .kv file so I searched similar questions and found out the way use Property and coded like this: # in python file class Test2App(App): abcd = StringProperty('test') def build(self): return presentation # in kv file <MyButton@Button>: text: "contents (%s)"%(app.abcd) background_color: (255, 255, 255,1)` and an error comes up. AttributeError: 'NoneType' object has no attribute 'bind' File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder

Pass variables from .py to .kv file

左心房为你撑大大i 提交于 2021-01-20 12:26:12
问题 I am trying to use variables from python file to .kv file so I searched similar questions and found out the way use Property and coded like this: # in python file class Test2App(App): abcd = StringProperty('test') def build(self): return presentation # in kv file <MyButton@Button>: text: "contents (%s)"%(app.abcd) background_color: (255, 255, 255,1)` and an error comes up. AttributeError: 'NoneType' object has no attribute 'bind' File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder

How can I get selected text in another textinput. Getting error “'ScreenManager' object has no attribute 'widget_1'”

本秂侑毒 提交于 2021-01-07 06:31:32
问题 I am trying to get the selected text from recycleview to the txt_input1 but it is throwing error. It was working in the separate .py file but then I transfered the code into my run1.py file and its not working the new code is start and end is enclosed in comments "#Start" and "end" run1.py file from kivy.lang import Builder from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import ObjectProperty from Option import OptionApp import sys, time, threading from kivy

How can I get Kivy to use sdl2 on Linux?

醉酒当歌 提交于 2021-01-07 03:21:40
问题 I've got a problem where Kivy uses sdl2 on android, and works fine, but on linux it uses ffpyplayer, which doesn't. So I'd like to get Kivy to use sdl2 on linux too, however sdl2 doesn't seem to work at all on linux. $ KIVY_AUDIO=sdl2 python min_audio_example.py [INFO ] [Audio ] Providers: audio_sdl2 (audio_ffpyplayer ignored) [CRITICAL] [AudioSDL2 ] Unable to open mixer: b'No such audio device' Here's a minimal example with demonstrates the problem. #!/usr/bin/env python # works with: #

How can I dispaly the selected item from recycleview to the texinput

天涯浪子 提交于 2021-01-05 07:28:21
问题 In following code I want to dispaly the selected item from recycleview to the text_box1 which is from class MyTextInput and the code to display in textbox is in the class SelectableLabel --> method apply_selection. the when I print the selected item it gets printed on console. when i try to display it in the textinput it shows the error. What changes should I do. the solution with the code will be good to understand. thank you test.py file from kivy.app import App from kivy.uix.textinput

Process Before Publishing a ready Kivy App in Playstore?

时光怂恿深爱的人放手 提交于 2021-01-01 13:53:53
问题 I already did buildozer android debug and have the .apk file installed and works fine, at least tested for one/two devices. This is also with the semi-default buildozer.spec , for example : the domain name is still org.test but with the name of the app is adjusted. With this .apk file (after buildozer android debug process), is this the one that is ready to be uploaded to playstore? or there is still some other (technical) preparations? I know that we may do beta test first before making it

Process Before Publishing a ready Kivy App in Playstore?

蹲街弑〆低调 提交于 2021-01-01 13:53:50
问题 I already did buildozer android debug and have the .apk file installed and works fine, at least tested for one/two devices. This is also with the semi-default buildozer.spec , for example : the domain name is still org.test but with the name of the app is adjusted. With this .apk file (after buildozer android debug process), is this the one that is ready to be uploaded to playstore? or there is still some other (technical) preparations? I know that we may do beta test first before making it