Импорт своего виджета

У меня есть главный файл (main.py)

from kivy.lang import Builder
from kivymd.app import MDApp

KV = '''
my_shop_online:

'''
class TestNavigationDrawer(MDApp):
    def __init__(self, **kwargs):
        self.title = "ПРАВДА ИЛИ ДЕЙСТВИЕ."
        super().__init__(**kwargs)
        self.screen = Builder.load_string(KV)

    def build(self):
        return self.screen

TestNavigationDrawer().run()

и второй файл my_shop

__all__ = ("my_shop_online")

from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout



Builder.load_string(
    """
<my_shop_online>:
    orientation: "vertical"
    BoxLayout:
        size_hint: 1, 0.08
        MDIconButton:
            icon: "android"
            user_font_size: "64sp"

        MDIconButton:
            icon: "android"
            user_font_size: "64sp"

    ScrollView:

        MDList:
            ThreeLineAvatarListItem:
                text: "Three-line item with avatar"
                secondary_text: "Secondary text here"
                tertiary_text: "fit more text than usual"

                ImageLeftWidget:
                    source: "data/logo/kivy-icon-256.png"
            ThreeLineAvatarListItem:
                text: "Three-line item with avatar"
                secondary_text: "Secondary text here"
                tertiary_text: "fit more text than usual"

                ImageLeftWidget:
                    source: "data/logo/kivy-icon-256.png"
            ThreeLineAvatarListItem:
                text: "Three-line item with avatar"
                secondary_text: "Secondary text here"
                tertiary_text: "fit more text than usual"

                ImageLeftWidget:
                    source: "data/logo/kivy-icon-256.png"


"""
)

class my_shop_online(BoxLayout):
    pass

Как мне импортировать второй файл в первый , + что бы заработало на андроид.


Ответы (0 шт):