如上图, 简单的两个按键如何在kivy中实现?
用boxlayout无法实现,最后决定用stacklayout.
kv 源代码如下:
StackLayout:
orientation:'rl-bt'
padding:10
spacing:10
MDFlatButton:
text: "取消"
font_name:'ms'
md_bg_color: app.theme_cls.primary_color
theme_text_color:"Primary"
#padding:10,10
MDFlatButton:
text: "确定"
font_name:'ms'
md_bg_color: app.theme_cls.primary_color
theme_text_color:"Primary"