示例#1
0
    def set_accordion_list(self):
        from kivymd.accordionlistitem import MDAccordionListItem

        def callback(text):
            toast('{} to {}'.format(text, content.name_item))

        content = ContentForAnimCard(callback=callback)

        for name_contact in self.names_contacts:
            self.accordion_list.ids.anim_list.add_widget(
                MDAccordionListItem(content=content,
                                    icon='assets/kivymd_logo.png',
                                    title=name_contact))
示例#2
0
    def set_accordion_list(self):
        from kivymd.accordionlistitem import MDAccordionListItem

        def callback(text):
            toast(f'{text} to {content.name_item}')

        content = ContentForAnimCard(callback=callback)

        for name_contact in self.names_contacts:
            self.data['Accordion List']['object'].ids.anim_list.add_widget(
                MDAccordionListItem(content=content,
                                    icon='assets/kivy-logo-white-512.png',
                                    title=name_contact))