有没有什么办法可以实现一个漂浮在其他所有东西上面的按钮。例如,Reddit安卓应用程序有这样一个按钮。我不想使用kivymd。
答案 0 :(得分:0)
您只需将内容放在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'