Android应用资源总结四:colorAccent,colorPrimary,colorPrimaryDark等的意义

伴随着Android5.0的发布也更新了support-v7-appcompat 到V21,其中增加了ToolBar、recyclerview、cardview等控件。
Android5.0对改变APP样式下了不小的功夫,写法也和以前不一样了,下面先简单介绍一下。
colorAccent,colorPrimary,colorPrimaryDark……的作用:

Android应用资源总结四:colorAccent,colorPrimary,colorPrimaryDark等的意义_第1张图片

  1. colorPrimary 应用的主要色调,actionBar默认使用该颜色,Toolbar导航栏的底色

  2. colorPrimaryDark 应用的主要暗色调,statusBarColor默认使用该颜色

  3. statusBarColor 状态栏颜色,默认使用colorPrimaryDark

  4. windowBackground 窗口背景颜色

  5. navigationBarColor 底部栏颜色

  6. colorForeground 应用的前景色,ListView的分割线,switch滑动区默认使用该颜色

  7. colorBackground 应用的背景色,popMenu的背景默认使用该颜色

  8. colorAccent CheckBox,RadioButton,SwitchCompat等一般控件的选中效果默认采用该颜色

  9. colorControlNormal CheckBox,RadioButton,SwitchCompat等默认状态的颜色。

  10. colorControlHighlight 控件按压时的色调

  11. colorControlActivated 控件选中时的颜色,默认使用colorAccent

  12. colorButtonNormal 默认按钮的背景颜色

  13. editTextColor :默认EditView输入框字体的颜色。

  14. textColor Button,textView的文字颜色

  15. textColorPrimaryDisableOnly RadioButton checkbox等控件的文字

  16. textColorPrimary 应用的主要文字颜色,actionBar的标题文字默认使用该颜色

  17. colorSwitchThumbNormal switch thumbs 默认状态的颜色. (switch off)

你可能感兴趣的:(android)