Kivy Tutorial 12 - Navigation Drawer | KivyMD

preview_player
Показать описание
In this video, we are going to create our Navigation Drawer using KivyMD Python.

Next video - Content in Navigation Drawer

#python #kivy #pythongui
Рекомендации по теме
Комментарии
Автор

UPDATE 01.2021: You have to change NavigationLayout to MDNavigationLayout, and "lambda x: to "lambda x: nav_drawer.set_state("open")", your welcome :)

marcinchuchla
Автор

5:00 toggle_nav_drawer() is depreciated, you can use set_state() and it has the same effect. At least in Dec 2020 :D

brendanjensen
Автор

Hey I got an error saying import error no module named "Navigation layout"

cyberofficial-plnp
Автор

thank u for the effort we hope that u will finish all series kivymd till packing apk and we will never forget that for u u will change alot of lives iam try to learn so i can take care of my family you make difference thank u

famout
Автор

I want to add a toolbar which includes buttons to chance screens. The problem is, that I need the ScreenManager for the toolbar and for the multiple screens. How can I do this?

pascals
Автор

hello there I was getting an error continuously when I try to run this code--> (the code was here)
from kivymd.app import MDApp
from kivy.lang import Builder
from kivy.core.window import Window

Window.size = (300, 500)

navigation_helper = """
Screen:
NavigationLayout:
ScreenManager:
Screen:
BoxLayout:
orientation: 'vertical'
MDToolBar:
title: "Demo"
left_action_items : [['menu', lambda x :
elevation: 10

Widget:

MDNavigationDrawer:
id: nav_drawer
"""


class DemoApp(MDApp):

def build(self):
screen =
return screen


DemoApp().run()
I think this is same as your code and the error coming is given below
--> [INFO ] [Logger ] Record log in
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at
[INFO ] [Python ] v3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at
[INFO ] [KivyMD ] v0.104.1
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.5.13541 Compatibility Profile Context 25.20.14003.2000'>
[INFO ] [GL ] OpenGL vendor <b'ATI Technologies Inc.'>
[INFO ] [GL ] OpenGL renderer <b'AMD Radeon(TM) R4 Graphics'>
[INFO ] [GL ] OpenGL parsed version: 4, 5
[INFO ] [GL ] Shading version <b'4.50'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
[INFO ] [GL ] NPOT texture support is available
Traceback (most recent call last):
File _drawer.py", line 34, in <module>
DemoApp().run()
File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\app.py", line 829, in run
root = self.build()
File _drawer.py", line 30, in build
screen =
File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\lang\builder.py", line 405, in load_string
rule_children=rule_children)
File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\lang\builder.py", line 659, in _apply_rule
child, crule, rootrule, rule_children=rule_children)
File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\lang\builder.py", line 659, in _apply_rule
child, crule, rootrule, rule_children=rule_children)
File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\lang\builder.py", line 659, in _apply_rule
child, crule, rootrule, rule_children=rule_children)
[Previous line repeated 1 more time]
File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\lang\builder.py", line 616, in _apply_rule
cls = Factory_get(cname)
File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\factory.py", line 131, in __getattr__
raise FactoryException('Unknown class <%s>' % name)
Unknown class <MDToolBar>

Process finished with exit code 1

please help me to solve this error

nishanthkgr
Автор

Hello sir I'm a student and working on a school project where I want to integrate this navigation drawer, but I always get an error whenever I write this code. I also tried the code in a single file where I wrote it as it is you have shown here, but still it gives the same error. Could you please help me in this. Waiting for your helpful reply.

rajatavasaha
Автор

I am eagerly waiting for your every upcoming Videos bro 😇👍👍

sunirnaychatterjee
Автор

Can you show this using the Builder.load_file("file.kv") with Screen_Manager being involved for multiple screens? I am having difficulty.

sweeterdeeker
Автор

I really appreciate that you do not use the kivi language .kv which in my opinion complicates things more ! Thanks for the tutorial !

PercyleoYT
Автор

i am always waiting for new videos of kivymd and love to watch them thanks sir

thunderstorm
Автор

Sir I am writing your same code but I am getting this error ReferenceError: weakly-referenced object no longer exists....
Please sir explain me Why this error is coming and give me solution to solve it...

Shivam-edfn
Автор

some function of kivymd changed in new update so make sure your function names is correct

g_o_a_t
Автор

I am getting an Error of "too many indentation level" at the navigation_helper

OfficialAviatorMentors
Автор

Change NavigationLayout to MDNavigationLayout. Also MDToolbar did not work. I changed it to MDTopAppBar for both top and bottom.
For Bottom Toolbar i used this code:
"...
MDBottomAppBar:
MDTopAppBar:
title: "Help"
...."
This worked for me.

aavalos
Автор

Hello Sir, I'm getting an Unknown class <Toolbar> error. Please, help

joeatlas
Автор

Thank you a lot for this video! It helped a lot

bigbadcatbigbcy
Автор

Thanks for vedio.
Q-1=>Can You Please tell me how can I Put Data tabel or a text entry at the place of that hello world label?
Q-2=>How can I get text of entry text from that helper string?

Disha._
Автор

Please can your next video be on how to change screens🥺🙏🏾

Jason-deoo
Автор

Hello have an error it says ScreenManager accepts only Screen widget😔

rosepiedrasingco