Standard Android Button with a different color

后端 未结 20 3284
误落风尘
误落风尘 2020-11-21 23:43

I\'d like to change the color of a standard Android button slightly in order to better match a client\'s branding.

The best way I\'ve found to do this so far is to c

20条回答
  •  逝去的感伤
    2020-11-22 00:00

    If you are making colour buttons with XML you can make the code a bit cleaner by specifying the focused and pressed state in a separate file and reuse them. My green button looks like this:

    
    
    
        
        
    
        
            
                
                
                
                
            
        
    
    
    

提交回复
热议问题