Created
August 18, 2020 20:01
-
-
Save kaustubhgupta/9becfb50a2f767790deeb7b954f0f299 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kv = """ | |
| Screen: | |
| BoxLayout: | |
| orientation: 'vertical' | |
| MDToolbar: | |
| title: "MDToolbar" | |
| left_action_items: [["menu", lambda x: nav_draw.set_state()]] | |
| Widget: | |
| NavigationLayout: | |
| ScreenManager: | |
| id: screen_manager | |
| Screen: | |
| name: "scr1" | |
| MDLabel: | |
| text: "Screen 1" | |
| halign: "center" | |
| Screen: | |
| name: "scr2" | |
| MDLabel: | |
| text: "Screen 2" | |
| halign: "center" | |
| MDNavigationDrawer: | |
| id: nav_draw | |
| orientation: "vertical" | |
| padding: "8dp" | |
| spacing: "8dp" | |
| AnchorLayout: | |
| anchor_x: "left" | |
| 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: | |
| text: "Kaustubh Gupta" | |
| font_style: "Button" | |
| size_hint_y: None | |
| height: self.texture_size[1] | |
| MDLabel: | |
| text: "[email protected]" | |
| font_style: "Caption" | |
| size_hint_y: None | |
| height: self.texture_size[1] | |
| ScrollView: | |
| MDList: | |
| OneLineAvatarListItem: | |
| on_press: | |
| nav_draw.set_state("close") | |
| screen_manager.current = "scr1" | |
| text: "Home" | |
| IconLeftWidget: | |
| icon: "home" | |
| OneLineAvatarListItem: | |
| on_press: | |
| nav_draw.set_state("close") | |
| screen_manager.current = "scr2" | |
| text: "About" | |
| IconLeftWidget: | |
| icon: 'information' | |
| Widget: | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment