目前这是我的kv代码,无法滚动:
BoxLayout:
id: bl
orientation: 'vertical'
padding: 10, 10
row_default_height: '48dp'
row_force_default: True
spacing: 10, 10
GridLayout:
id: layout_content
cols: 1
row_default_height: '20dp'
row_force_default: True
spacing: 0, 0
padding: 0, 0
Label:
text: 'You don''t have any downloads. Please add new download from Home screen'
如何使上面的kv代码可滚动?我知道Kivy ScrollView只接受一个子视图,而且我已经将GridLayout设置为一个新的ScrollView的子视图。但没用。有什么建议吗?
根据documentation for ScrollView提示,必须至少禁用ScrollView的一个子大小:
并绑定布局的大小以适应自身:
相关问题 更多 >
编程相关推荐