State list drawable and disabled state

前端 未结 3 1537

I have a button and I want it to have different background when I set:

android:enabled=\"false\"

Here\'s resource file for background:

3条回答
  •  感动是毒
    2020-12-04 22:20

    Put this line :

    
    

    as first item (it must be first item, otherwise it will not work) of the selector tag.

    Final :

    
                
                 
                 
                 
    
    

提交回复
热议问题