【Kivy】Accordion を表示する

  • main.py
from kivy.app import App

class MainApp(App):
    pass

if __name__ == '__main__':
    MainApp().run()
  • main.kv
#:kivy 1.0
Accordion:
    AccordionItem:
        title: 'item 1 title'
        Label:
            text: 'item 1 contents'
    AccordionItem:
        title: 'item 2 title'
        Label:
            text: 'item 2 contents'