1

In my MDNavigationDrawer I put a button from which I want to change to a new screen 'About Us' but on the click, it is not responding The button is inside root widget of ContentNavigationDrawer in .kv file and I want to switch screen in AboutUs class but it is not responding

here's my class of About us in .py file

Class AboutUS(BoxLayout):
    pass

here's the code in .kv file

Screen:
    AboutUs:

    MainScreen:

    NavigationLayout:

        ScreenManager:

            Screen:

                BoxLayout:
                    orientation: 'vertical'

                    MDToolbar:
                        title: "Story A Day"
                        anchor_title: 'left'
                        elevation: 10
                        left_action_items: 
                            [['menu',lambdax:nav_drawer.set_state()]]
                        mode: "free-center"
                        right_action_items: 
                            [["jellyfish", lambda x: print('HELLOFK')]]

                    Widget:



        MDNavigationDrawer:
            title: 'Story A Day'
            id: nav_drawer
            swipe_distance: 10

            ContentNavigationDrawer:
                id: content_drawer

<ContentNavigationDrawer>
    background_color: 2, 3, 4, 5
    orientation: "vertical"
    padding: "8dp"
    spacing: "8dp"

    AnchorLayout:
        anchor_x: "right"
        size_hint_y: None
        height: avatar.height

        Image:
            id: avatar
            size_hint: None, None
            size: "56dp", "56dp"
            source: "data/logo/kivy-icon-256.png"

        MDLabel:
            anchor_y: 'left'
            text: "[b]Story A Day[/b]"
            theme_text_color: "Custom"
            text_color: 0, 0, 0, 1
            markup: True
            font_style: "H4"
            size_hint_y: None
            height: self.texture_size[1]

    MDRaisedButton:
        md_bg_color: 0, 0, 0, 1
        text: 'You Can'
        on_release: root.hllo()

    MDRaisedButton:
        text: 'Click Me'
        on_release: print('Hell')

    MDLabel: 
        text: 'Story A Day'
        font_style: "Button"
        size_hint_y: None
        height: self.texture_size[1]

    MDExpansionPanelTwoLine:
        text: 'send us your idea'
        secondary_text: 'email: xxxxx@gmail.com'

        IconLeftWidget:
            icon: "email"

    OneLineAvatarListItem:
        text: "About Us"
        on_release:
            app.current = "abt"

        IconLeftWidget:
            icon: "information"
            on_press: print('a')

    ScrollView:

<AboutUs>:
    id: manager
    name: 'abt'

    Label:
        text: "About Us"
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Vinz
  • 255
  • 1
  • 9

0 Answers0