In this video I’ll show you how to build a bottom Navbar with Icons for KivyMD and Python.

We’ll create a MDToolbar with MDBottomNavigation and we’ll set the MDBottomNavigationItem to have icons that you can click on and have things change based on clicking.

I’ll also show you where to find icons for KivyMY,
hint: http://zavoloklom.github.io/material-design-iconic-font/icons.html

#kivy #codemy

Python Code: bbar.py
GitHub Code: bbar.py

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


class MainApp(MDApp):
	def build(self):
		self.theme_cls.theme_style = "Dark"
		self.theme_cls.primary_palette = "BlueGray"
		return Builder.load_file('bbar.kv')
	
	
MainApp().run()

Kivy Design Code: bbar.kv
GitHub Code: bbar.kv

BoxLayout:
    orientation: 'vertical'

    MDToolbar:
        title: "Bottom Navbar"
        md_bg_color: .2,.2,.2,1
        specific_text_color: 1,1,1,1

    MDBottomNavigation:
        #color stuff
        #panel_color: 0,0,1,1

        MDBottomNavigationItem:
            name: 'screen 1'
            text: "Python"
            icon: 'language-python'

            MDLabel:
                text: "Python"
                halign: 'center'

        MDBottomNavigationItem:
            name: 'screen 2'
            text: "Youtube"
            icon: 'youtube'

            MDLabel:
                text: "Codemy YouTube Channel Rocks!"
                halign: 'center'


        MDBottomNavigationItem:
            name: 'screen 3'
            text: "Instagram"
            icon: 'instagram'

            MDLabel:
                text: "My Instagram:\nrealjohnelder"
                halign: 'center'



John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

1 comment

Your email address will not be published. Required fields are marked *

John Elder