How to reference a theme attribute in a style?

后端 未结 2 648
慢半拍i
慢半拍i 2021-02-02 00:52

I\'ve got a following problem. I want to customize appearance of row in a list, but exception is thrown during inflating.

piece of code in style.xml

<         


        
2条回答
  •  一个人的身影
    2021-02-02 01:32

    Try to create the themes.xml file and add the below lines in it.

    Themes.xml

    
    

    attrs.xml
    Change the the format="reference" in your attrs.xml file.

    
    
        
    
    

    styles.xml

    
    
    
    

    Then after define your style to the TextView as below:

    
    

提交回复
热议问题