在kivymd中更改TwoLineAvatarIconListItem的颜色

时间:2020-07-17 22:07:53

标签: python kivy kivy-language

               TwoLineAvatarIconListItem:

                    on_release:
                        screen_manager.current = "screen1"

                    text: "DinoDevonioz"
                    secondary_text: "Secondary text here"

                    IconLeftWidget:
                        icon: "woman.jpg"

                    IconRightWidget:
                        icon: "minus"
                    
                    text_color: 1, 1, 1, 1

不起作用。我想更改此小部件中每一行文本的颜色。我该怎么办?

1 个答案:

答案 0 :(得分:0)

    TwoLineAvatarIconList:
        text: 'Your text'
        text_color: 1, 1, 1, 1
        secondary_text_color: 1, 1, 1, 1 

阅读文档:https://kivymd.readthedocs.io/en/latest/components/list/#twolineavatarlistitem