Standard Android Button with a different color

后端 未结 20 3258
误落风尘
误落风尘 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:03

    I discovered that this can all be done in one file fairly easily. Put something like the following code in a file named custom_button.xml and then set background="@drawable/custom_button" in your button view:

    
    
    
        
            
                
                
                
                
            
        
    
        
            
                
                
                
                
            
        
    
                
            
                
                
                
                
            
        
    
    

提交回复
热议问题