from kivymd.app import MDApp
from kivymd.uix.bottomnavigation import MDBottomNavigation, MDBottomNavigationItem
from kivymd.uix.label import MDLabel
from kivymd.uix.screen import MDScreen
class Test(MDApp):
text_string = "Changed text"
def build(self):
self.theme_cls.material_style = "M3"
self.theme_cls.theme_style = "Dark"
self.label = MDLabel(text='Example')
return (
MDScreen(
MDBottomNavigation(self.label)
)
)
def on_start(self):
self.label.text = self.text_string
Test().run()