Layout [Python][Kivy]布局中的两轴滚动视图
我对Python上的Kivy非常陌生,我正在尝试制作一个android应用程序 由于我们的移动设备的尺寸没有我们在pc上使用的屏幕那么大和宽 我需要做网格布局(表格),这应该是滚动到x轴和y轴 谁能给我一个好的可执行的工作示例 这就是我想要的Layout [Python][Kivy]布局中的两轴滚动视图,layout,kivy,scrollview,Layout,Kivy,Scrollview,我对Python上的Kivy非常陌生,我正在尝试制作一个android应用程序 由于我们的移动设备的尺寸没有我们在pc上使用的屏幕那么大和宽 我需要做网格布局(表格),这应该是滚动到x轴和y轴 谁能给我一个好的可执行的工作示例 这就是我想要的 App(): Screen(): ScreenVeiw(vertical and horizontal movement availability) GridLayout():
App():
Screen():
ScreenVeiw(vertical and horizontal movement availability)
GridLayout():
Labels():
我衷心感谢您的指导和支持
希望你们都有一个美好的一天 下面是GridLayout在x轴和y轴上都启用滚动的工作示例:
from kivy.app import App
from kivy.lang import Builder
APP_KV = """
ScrollView:
GridLayout:
cols: 4
size_hint: None, None
height: self.minimum_height
width: self.minimum_width
row_default_height: 200
col_default_width: 400
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
"""
class MainApp(App):
def build(self):
return Builder.load_string(APP_KV)
if __name__ == '__main__':
MainApp().run()