

from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.lang import Builder
Builder.load_file('simple_demo.kv')
class TestWidget(GridLayout):
pass
class TestApp(App):
def build(self):
return TestWidget()
if __name__ == '__main__':
TestApp().run()
#:kivy 1.7.0
<TestWidget>
rows: 3
columns: 2
CodeInput:
TextInput:
multiline: False
hint_text: 'I am some hint text'
Accordion:
AccordionItem:
title: 'I am an accordion'
Label:
text:'I am a label inside an accordion'
AccordionItem:
title: 'I am too!'
Button:
text: 'I am a random button!'
Label:
text: 'I am a label'
Button:
text: 'I am a button!'
on_press: self.text = 'I am being pressed!'
on_release: self.text = 'I was just pressed!'

#:kivy 1.7.0 <TestWidget> rows: 3 columns: 2class TestWidget(GridLayout): pass
CodeInput:TextInput: multiline: False hint_text: 'I am some hint text'Accordion: AccordionItem: title: 'I am an accordion' Label: text:'I am a label inside an accordion' AccordionItem: title: 'I am too!' Button: text: 'I am a random button!'Label: text: 'I am a label' Button: text: 'I am a button!' on_press: self.text = 'I am being pressed!' on_release: self.text = 'I was just pressed!'
class TestApp(App):
def build(self):
return TestWidget()
if __name__ == '__main__':
TestApp().run()