How to create a state list drawable for my ListView items?

前端 未结 1 651
情话喂你
情话喂你 2021-01-26 15:13

I have a custom ListView selector which draws on top of a ListView. It works fine, but I want the text inside of the listview to turn white. How can I do that?

&         


        
1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-26 16:10

    You need to apply specific color or selector to each list item.

    I have something like this (abreviated)

    layout/dash_item.xml

    
       ... Your text components etc ....
    

    color/dashboard_selector.xml

    
        
         
         
    
    

    values/style.xml

     
    

    You probably will need to play with it to figure where exactly apply things. It can probably be simplified. Anyway, it's just a direction since I don't know your specific requirements.

    0 讨论(0)
提交回复
热议问题