美文网首页
自定义颜色

自定义颜色

作者: 乐此不痞 | 来源:发表于2016-09-02 11:19 被阅读0次
  • colorPrimaryDark(状态栏底色)
    在风格 (styles) 或是主题 (themes) 里进行设定。

  • App bar 底色
    这个设定分为二,若你的 android app 仍是使用 actionbar ,则直接在风格 (styles) 或是主题 (themes) 里进行设定 colorPrimary 参数即可;可若是采用 toolbar 的话,则要在界面 (layout) 里面设定 toolbar 控件的 background 属性。

  • navigationBarColor(导航栏底色)
    仅能在API v21也就是Android L以后的版本中使用, 因此要将之设定在 res/values-v21/styles.xml 里面。

  • windowBackground(主视窗底色)
    主题 (themes) 里进行设定。

相关文章

网友评论

      本文标题:自定义颜色

      本文链接:https://www.haomeiwen.com/subject/dwmhettx.html