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:
|
相关文章
- 09-25material design——设计文档
- 09-25Material Design练习
- 09-25修改微信小程序的原生button样式
- 09-25利用styled-component修改Ant Design 样式
- 09-25Material Design Object
- 09-25Material Design组件之FloatingActionButton
- 09-25Material Design的基础知识
- 09-25Material design风格的日期选择器
- 09-25安卓开发笔记(三十四):Material Design框架实现优美的左侧侧滑栏
- 09-25【Material Design】——悬浮按钮和可交互提示