Kivy Tutorial 12 - Navigation Drawer | KivyMD

Поделиться
HTML-код
  • Опубликовано: 14 ноя 2024

Комментарии • 87

  • @marcinchuchla8699
    @marcinchuchla8699 3 года назад +150

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

    • @michaellarsonlee
      @michaellarsonlee 3 года назад +7

      lmao dude you are an absolute homie thank you. Wasnt working so ctrl+f "navigation" and boom. Thanks

    • @bikappa
      @bikappa 3 года назад +4

      I've been looking for this all day. This comment must be on top, thank you so much!

    • @dipuometuel6806
      @dipuometuel6806 3 года назад +1

      @@bikappa thanks bro

    • @felipegerhardt8600
      @felipegerhardt8600 3 года назад +2

      You saved me some hours, thank you

    • @simeonphiri7022
      @simeonphiri7022 3 года назад +1

      Genius.....You Saved me a hell lot of time researching

  • @brendanjensen1721
    @brendanjensen1721 3 года назад +6

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

  • @famout9048
    @famout9048 4 года назад +3

    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

  • @cyberofficial-pl3np
    @cyberofficial-pl3np 3 года назад +3

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

  • @sunirnaychatterjee1477
    @sunirnaychatterjee1477 4 года назад +3

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

  • @aavalos163
    @aavalos163 Год назад +2

    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.

  • @pascals1025
    @pascals1025 3 года назад +1

    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?

  • @angel7871
    @angel7871 3 года назад +2

    MDNavigationLayout *

  • @bigbadcatbigbcy2933
    @bigbadcatbigbcy2933 Год назад

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

  • @rajatavasaha5269
    @rajatavasaha5269 3 года назад +1

    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.

  • @b.d.vishwapraveensarathcha6771
    @b.d.vishwapraveensarathcha6771 3 года назад +1

    Well explained . Thank so much !

  • @thunderstorm294
    @thunderstorm294 4 года назад

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

  • @Percyleo12YT
    @Percyleo12YT 4 года назад

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

  • @g_o_a_t315
    @g_o_a_t315 4 месяца назад

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

  • @Jason-de3oo
    @Jason-de3oo 4 года назад +3

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

    • @AlexGogev
      @AlexGogev 3 года назад +1

      did you fugure it out ?

  • @sweeterdeeker9436
    @sweeterdeeker9436 Год назад

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

  • @g_o_a_t315
    @g_o_a_t315 4 месяца назад

    Screen:
    MDNavigationLayout:
    ScreenManager:
    Screen:
    BoxLayout:
    orientation: 'vertical'
    MDTopAppBar:
    pos_hint:{'top':1}
    title: 'DEMO'
    left_action_items:[["coffee",lambda x: nav_drawer.set_state("open")]]
    elevation:18

    Widget:

    MDNavigationDrawer:
    id:nav_drawer
    BoxLayout:
    orientation:'vertical'
    MDLabel:
    text : "hello"

    • @g_o_a_t315
      @g_o_a_t315 4 месяца назад

      lambda x: nav_drawer.set_state("open") AND MDNavigationDrawer has right names so see it correctly

  • @Disha.0_0
    @Disha.0_0 4 года назад

    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?

  • @bsnljkd
    @bsnljkd 4 года назад

    Very Nice video Man! Pl. keep continue with your nice work. if u got time from your busy schedule then I wanna know how to display real time json api using KivyMD. Thanks again!

  • @Shivam-ed5fn
    @Shivam-ed5fn 4 года назад +2

    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...

    • @mohammedMusabKhan
      @mohammedMusabKhan 4 года назад

      Same problem ,
      ReferenceError: weakly-referenced object no longer exists

    • @Shivam-ed5fn
      @Shivam-ed5fn 4 года назад +1

      @@mohammedMusabKhan Bro I think try it on your PC with different pycharm version

  • @HieuNguyen-cg1kd
    @HieuNguyen-cg1kd 4 года назад

    Nice video, 1 like for your series 👌

  • @Independent_AI
    @Independent_AI 3 месяца назад

    Great 👍🏻

  • @nishanth123kgr
    @nishanth123kgr 4 года назад +1

    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 : nav_drawer.toggle_nav_drawer()]]
    elevation: 10

    Widget:

    MDNavigationDrawer:
    id: nav_drawer
    """
    class DemoApp(MDApp):
    def build(self):
    screen = Builder.load_string(navigation_helper)
    return screen
    DemoApp().run()
    I think this is same as your code and the error coming is given below
    --> [INFO ] [Logger ] Record log in C:\Users\ELCOT\.kivy\logs\kivy_20-10-05_31.txt
    [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 "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\__init__.py"
    [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 "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\Scripts\python.exe"
    [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
    [INFO ] [GL ] OpenGL version
    [INFO ] [GL ] OpenGL vendor
    [INFO ] [GL ] OpenGL renderer
    [INFO ] [GL ] OpenGL parsed version: 4, 5
    [INFO ] [GL ] Shading version
    [INFO ] [GL ] Texture max size
    [INFO ] [GL ] Texture max units
    [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 "C:/Users/ELCOT/PycharmProjects/KivyMD-Basics/navigation _drawer.py", line 34, in
    DemoApp().run()
    File "C:\Users\ELCOT\PycharmProjects\KivyMD-Basics\venv\lib\site-packages\kivy\app.py", line 829, in run
    root = self.build()
    File "C:/Users/ELCOT/PycharmProjects/KivyMD-Basics/navigation _drawer.py", line 30, in build
    screen = Builder.load_string(navigation_helper)
    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 ' % name)
    kivy.factory.FactoryException: Unknown class
    Process finished with exit code 1
    please help me to solve this error

  • @hash261k
    @hash261k Год назад

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

  • @Jason-de3oo
    @Jason-de3oo 4 года назад +1

    Nice video👏🏾👏🏾👏🏾

  • @vruniverse2917
    @vruniverse2917 3 года назад

    Can you make a video for share button for your app

  • @joeatlas4722
    @joeatlas4722 2 года назад

    Hello Sir, I'm getting an kivy.factory.FactoryException: Unknown class error. Please, help

    • @magodaniele
      @magodaniele 2 года назад +1

      Just change Toolbar to MDTopAppBar :)

  • @collegeresources1089
    @collegeresources1089 4 года назад +1

    You're my ideal...

  • @rosepiedrasingco7073
    @rosepiedrasingco7073 2 года назад

    Hello here.....i have an error it says kivy.uix.screenmanager.ScreenManagerException: ScreenManager accepts only Screen widget😔

    • @rosepiedrasingco7073
      @rosepiedrasingco7073 2 года назад

      I'm just a beginner and I don't know what causes the error😔

    • @iamefghwr4522
      @iamefghwr4522 2 года назад

      Put the whole BoxLayout within a second screen.

  • @mcodes5214
    @mcodes5214 4 года назад

    How long this series will be ?

  • @satyamjaiswal398
    @satyamjaiswal398 4 года назад

    sir how can we create tabs?

  • @frezee13free
    @frezee13free 3 года назад

    Woooow ;) thx ;)

  • @cyberofficial-pl3np
    @cyberofficial-pl3np 3 года назад

    Plse let some one help me the navigation layout error

  • @vishwatejn8914
    @vishwatejn8914 4 года назад

    Can we deploy this app in Play store bro..?

  • @grendbelema
    @grendbelema 4 года назад

    thanks

  • @sravanthikadali6058
    @sravanthikadali6058 3 года назад

    I am a boy, years: 11, class: 6th

  • @sunirnaychatterjee8963
    @sunirnaychatterjee8963 4 года назад

    😇

  • @smyrf5219
    @smyrf5219 3 года назад

    топ видео

  • @badr_eddin.py1
    @badr_eddin.py1 3 года назад

    Hhhhh you tell so mach "oh right guys"

  • @TheVerbalAxiom
    @TheVerbalAxiom 7 месяцев назад

    Didn't explain too much at all. Very disappointing. 😐