有什么办法可以实现一个浮动在所有其他东西之上的按钮。例如,Reddit android 应用程序就有这样一个按钮。我不想使用 kivymd。
例如,您只需将您的内容放在 FloatLayout 中,并将按钮作为 FloatLayout 的另一个子项,并告诉它是所需的大小和位置。
FloatLayout:
BoxLayout:
orientation: 'vertical'
Label:
text: '1'
Label:
text: '2'
Label:
text: '3'
Label:
text: '4'
Button:
size_hint: None, None
right: self.width and root.right - 200
y: 200
text: 'such button'
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句