[英]Python kivy listview with custom layout?
I'm trying to write application in kivy. 我正在尝试用kivy编写应用程序。 I would like it to have listview with custom row layout (label on top, below image scaled to window width and below some images, labels and button - see pic). 我希望它具有具有自定义行布局的listview(标签在顶部,下方,按比例缩放到窗口宽度的图像以及下方一些图像,标签和按钮-参见图片)。 Is it possible to do that with kivy.uix.listview? 是否可以使用kivy.uix.listview做到这一点? Or some other way? 还是其他方式? I was looking on docs but I couldn't find answer to my question. 我在看文档,但找不到我的问题的答案。
Yes, it is written in docs here: Adapter 是的,它是在以下文档中编写的: 适配器
Use either cls
or template
property to link a customized widget to a list view. 使用cls
或template
属性将自定义窗口小部件链接到列表视图。
Here you can see cls
bound to ListItemButton
. 在这里,您可以看到绑定到ListItemButton
cls
。 Put your own widget in its place. 将您自己的小部件放在其位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.