• colorPrimaryDark

    • 状态栏背景色。

    • 在 style 的属性中设置。

  • textColorPrimary

    • App bar 上的标题与更多菜单中的文字颜色。

    • 在 style 的属性中设置。

  • App bar 的背景色

    • Actionbar 的背景色设定在 style 中的 colorPrimary。

    • Toolbar 的背景色在layout文件中设置background属性。

  • colorAccent

    • 各控制元件(如:check box、switch 或是 radoi) 被勾选 (checked) 或是选定 (selected) 的颜色。

    • 在 style 的属性中设置。

  • colorControlNormal

    • 各控制元件的预设颜色。

    • 在 style 的属性中设置

  • windowBackground

    • App 的背景色。

    • 在 style 的属性中设置

  • navigationBarColor

    • 导航栏的背景色,但只能用在 API Level 21 (Android 5) 以上的版本

    • 在 style 的属性中设置

更改颜色需要注意 :

1.setSupportActionBar(toolbar);

更改menu的文字颜色、背景颜色、弹出颜色注意:

2.app:popupTheme="@style/ToolbarPopupTheme"

<style name="ToolbarPopupTheme" parent="@style/ThemeOverlay.AppCompat">
<item name="android:colorBackground">@color/colorPrimary</item>
</style>
<style name="AppTheme" parent="AppTheme.Base"/>
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowNoTitle">true</item>
<!-- toolbar标题文字颜色 -->
<item name="android:textColorPrimary">@android:color/white</item>
<item name="alertDialogTheme">@style/AlertDialogCustom</item>
<!-- <item name="toolbarStyle">@style/Widget.Toolbar</item> -->
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorControlNormal">@android:color/white</item>
</style>
<application
android:name=".WifixApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/AppTheme">

ToolBar Style的更多相关文章

  1. swift 关于 toolbar 学习笔记

    import UIKit class ViewController: UIViewController { @IBOutlet weak var toolBar: UIToolbar! @IBOutl ...

  2. android toolbar效果4

    两个标题的,右边一个按钮 activity_main.xml: <android.support.v7.widget.Toolbar style="style/toolbarStyle ...

  3. android toolbar效果3

    Title居中,只有一个右边按钮 activity_main.xml: <?xml version="1.0" encoding="utf-8"?> ...

  4. android toolbar效果2

    只有一个按钮的情况 <resources> <string name="app_name">照片</string></resources& ...

  5. SuperMap iClient for JavaScript 新手入门

    地理信息系统(英语:Geographic Information System,缩写:GIS)是一门综合性学科,结合地理学与地图学,已经广泛的应用在不同的领域,是用于输入.存储.查询.分析和显示地理数 ...

  6. jquery easyui 动态绑定数据列

    function doSearch2() { var strsql = $('#sssql').val(); $.ajax({ url: "../HttpHandler/DownloadHa ...

  7. 在手机网页上模拟 js 控制台

    在手机上模拟 console  做一些简单代码调试 在工作机上编辑好代码用QQ 之类的工具传到 手机上在调试当然你也可以尝试用一只手指写代码的壮举设置 window.console = mobiDeb ...

  8. nodejs+edatagrid读取本地excel表格

     

  9. extjs后自己写了一些见不得人的脚本

    <html> <head> <title> 配置管理器 </title> <style type="text/css"> ...

随机推荐

  1. 【Linux】用grep在文档中查找内容

    有时候,我们需要在文档中查找一些内容,常用grep.它在文档查找相关内容并输出匹配行. > 查找某关键字 在system.log中,查找包含keyword的行 grep 'keyword' sy ...

  2. 自动布局(Masonry)设置tabbar

    //自定义标签工具栏 - (void) initTabBarView{ // self.bottomView = [[UIView alloc]initWithFrame:CGRectMake(, k ...

  3. SqlSever基础 Upper函数 返回字符串的大写形式

    镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...

  4. web应用中web.xml配置详解

    Web.xml常用元素 <web-app> <display-name></display-name>定义了WEB应用的名字 <description> ...

  5. MD5加密算法

    package com.bao.tools.encryption; import java.security.MessageDigest;import java.security.NoSuchAlgo ...

  6. oracle学习笔记——配置环境

    题记:最近再学oracle,于是按照这本经典的书<Oracle Database 9i/10g/11g编程艺术>来学习. 配置环境 如何正确建立SCOTT/TIGER演示模式 需要建立和运 ...

  7. Nessus基本命令

    /etc/init.d/nessusd start 启动nessusd服务 默认端口8834 添加用户(未知是什么用户) sudo /opt/nessus/sbin/nessus-adduser

  8. CSS笔记(十二)CSS3之2D和3D转换

    参考:http://www.w3school.com.cn/css3/css3_2dtransform.asp 2D Transform 方法 函数 描述 matrix(n,n,n,n,n,n) 定义 ...

  9. 10款Windows命令行工具

    Windows下CMD不好用,远没有Linux,或者一些SSH工具用起来方便.其实Windows下,也有一些不错的工具替代CMD: 0.powercmd经过比较,我最终选择了这款,这里补充一下截图:

  10. 使用spring过程中遇到的问题

    1.java.lang.SecurityException: sealing violation: package javax.servlet is sealed java.lang.Security ...