• 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. 2016年7月1日 星期五 --出埃及记 Exodus 14:28

    2016年7月1日 星期五 --出埃及记 Exodus 14:28 The water flowed back and covered the chariots and horsemen--the e ...

  2. OS开发(Objective-C)常用库索引

    code4app.com 这网站不错,收集各种 iOS App 开发可以用到的代码示例 cocoacontrols.com/ 英文版本的lib收集 objclibs.com/ 精品lib的收集网站 h ...

  3. SaveXml的方法汇总

    /// <summary> /// 保存XML文件 /// </summary> /// <returns></returns> public bool ...

  4. xshell无法连接centos 6.6的问题

    最近在做MySQL集群配置的预研工作,需要在VirtualBox上安装CentOS 6.6.参照网上的教程安装好centos后,出现了一个问题:虚拟机外部的文本内容无法复制粘贴到CentOS的终端里去 ...

  5. Java String 一些实验

    1.请查看String.equals()方法的实现代码,注意学习其实现方法. 结果: 原因: 当直接使用new关键字创建字符串对象时,虽然值一致(都是“Hello”),但s1.s2仍然是两个独立的对象 ...

  6. 【转载】.NET面试题系列[0] - 写在前面

    原文:.NET面试题系列[0] - 写在前面 索引: .NET框架基础知识[1] - .NET框架基础知识(1) http://www.cnblogs.com/haoyifei/p/5643689.h ...

  7. 插入中文错误ERROR 1406 (22001): Data too long for column 'name' at row 1

    1.在导入数据前执行以下命令即可:set SESSION sql_mode=''; 通过设置sql_mode变量更改模式.linux下安装完mysql后,默认的sql-mode值是空,在这种情形下my ...

  8. 不小心删除数据--利用MySQL的binlog恢复数据

    MySQL Binary Log也就是常说的bin-log, ,是mysql执行改动产生的二进制日志文件,其主要作用有两个: * 数据回复 * 主从数据库.用于slave端执行增删改,保持与maste ...

  9. 迷你sql profile,给缺少sql跟踪的朋友们

    如果你的数据库没有sqlprofile,看这里. 如果你没时间装sqlserver那一系列的东西,看看这里,也许能解决呢. 这是一个迷你版的sqlprofile ,在win7下测试,链接sqlserv ...

  10. ios uiview封装动画(摘录)

    iOS开发UI篇—核心动画(UIView封装动画) 一.UIView动画(首尾) 1.简单说明 UIKit直接将动画集成到UIView类中,当内部的一些属性发生改变时,UIView将为这些改变提供动画 ...