132down voteaccepted
|
I will add my answer since I don't use any of the other answers provided. With the Support Library v7, all the styles are actually already defined and ready to use, for the standard buttons, all of these styles are available:
To answer the question, the style to use is therefore How to change the colorFor the whole app: The color of all the UI controls (not only buttons, but also floating action buttons, checkboxes etc.) is managed by the attribute
For a specific button: If you need to change the style of a specific button, you can define a new style, inheriting one of the parent styles described above. In the example below I just changed the background and font colors:
Then you just need to apply this new style on the button with:
|
相关文章
- 微信小程序button组件样式
- ant design ui 的a-modal 样式修改
- swing-基础button圆角样式工具类分享
- H5 页面36种漂亮的CSS3网页按钮Button样式
- 值得一看!2018年最优秀的9个Android Material Design Apps!
- WPF 中,动态创建Button,并使Button得样式按照自定义的Resource样式显示
- 030 Android 第三方开源下拉框:NiceSpinner的使用+自定义Button样式+shape绘制控件背景图+图片选择器(selector)
- 使用Material Design 应用主题
- Material Design设计规范(三)
- HomeAssistant集成部署MDI(Material Design Icons)图标标签