Use an id to address the Toolbar widget, and change the value of the list. Here is an example:
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
MDBoxLayout:
orientation: 'vertical'
BoxLayout
Button:
text: 'Play'
on_release:
toolbar.left_action_items = [["play", lambda x: x]]
Button:
text: 'Pause'
on_release:
toolbar.left_action_items = [["pause", lambda x: x]]
# Will always be at the bottom of the screen.
MDBottomAppBar:
MDToolbar:
id: toolbar
title: "Title"
icon: "git"
type: "bottom"
left_action_items: [["stop", lambda x: x]]
'''
class Test(MDApp):
def build(self):
return Builder.load_string(KV)
Test().run()
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5b7acf0d-2187-44d2-af8d-404b383c12efn%40googlegroups.com.