我使用的是kivymd中的浮动操作按钮快速拨号。我想在按下单个按钮后添加功能(导航到另一个屏幕)。谁能举个例子告诉我怎么做
<HomeScreen>:
name: "home"
MDFloatingActionButtonSpeedDial:
data:
{'home': 'Domov',
'lightning-bolt': 'Ciele',
'notebook': 'Moje testy'}
<TestScreen>:
name: "test"
<GoalsScreen>:
name: "goals"
<HistoryScreen>:
name: "history"
我尝试了一些像普通按钮的东西,但它没有 不行
on_release:
root.manager.current = "test"
您可以将
callback
添加到MDFloatingActionButtonSpeedDial
:使用应用程序中定义的
call()
方法:然后,按下任何按钮都将触发
call()
方法相关问题 更多 >
编程相关推荐