How to create custom shape button with selector in android?

前端 未结 5 1561
小蘑菇
小蘑菇 2020-11-28 15:09

MOCK UP


\"Button\"

Requirement


I want to put cust

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 15:30

    You can also create a shape that is using a selector inside. If your shape is just changing its color in different states, this is a lot cleaner.

    color/color_selector.xml

    
        
        
    
    

    drawable/shape.xml

    
        
        
        
    
    

提交回复
热议问题