'For a KivyMD BottomNavigation, is it possible to apply Material Design 3?
https://kivymd.readthedocs.io/en/latest/components/bottomnavigation
I tried to apply material design 3 in KivyMD project.
I ran the example code on the KivyMD document.
It incudes self.theme_cls.material_style = "M3", but it displays material design 2 like
this.
I use the latest version of KivyMD, 0.104.2.
from kivy.lang import Builder
from kivymd.app import MDApp
class Test(MDApp):
def build(self):
self.theme_cls.material_style = "M3"
return Builder.load_string(
'''
#:import get_color_from_hex kivy.utils.get_color_from_hex
MDScreen:
MDBottomNavigation:
panel_color: get_color_from_hex("#eeeaea")
selected_color_background: get_color_from_hex("#97ecf8")
text_color_active: 0, 0, 0, 1
MDBottomNavigationItem:
name: 'screen 1'
text: 'Mail'
icon: 'gmail'
badge_icon: "numeric-10"
MDLabel:
text: 'Mail'
halign: 'center'
MDBottomNavigationItem:
name: 'screen 2'
text: 'Discord'
icon: 'discord'
badge_icon: "numeric-5"
MDLabel:
text: 'Discord'
halign: 'center'
MDBottomNavigationItem:
name: 'screen 3'
text: 'LinkedIN'
icon: 'linkedin'
MDLabel:
text: 'LinkedIN'
halign: 'center'
'''
)
Test().run()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
