Standard Android Button with a different color

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

    I am using this approach

    style.xml

    
    
    
    
    

    As you can see from above, I'm using a custom style for my button. The button color corresponds to the accent color. I find this a much better approach than setting android:background as I won't lose the ripple effect Google provides.

提交回复
热议问题