from kivy.lang import Builder
from kivy.uix.accordion import Accordion, AccordionItem
from kivy.uix.label import Label
from kivy.app import App

opciones = Builder.load_string('''
Accordion:
    AccordionItem:
        title: "Opcion 1"
    AccordionItem:
        title: "Opcion 2"
    AccordionItem:
        title: "Opcion 3"
    AccordionItem:
        title: "Opcion 4"

''')


class AccordionApp(App):
    def build(self):
        root = Accordion()
        for x in range(5):
            item = AccordionItem(title='Title %d' % x)
            item.add_widget(Label(text='Very big content\n' * 10))
            root.add_widget(item)
        return opciones

if __name__ == '__main__':
    AccordionApp().run()

