ToolBar Style
2016-03-31 11:28
267 查看
colorPrimaryDark状态栏背景色。在 style 的属性中设置。textColorPrimaryApp bar 上的标题与更多菜单中的文字颜色。在 style 的属性中设置。App bar 的背景色Actionbar 的背景色设定在 style 中的 colorPrimary。Toolbar 的背景色在layout文件中设置background属性。colorAccent各控制元件(如:check box、switch 或是 radoi) 被勾选 (checked) 或是选定 (selected) 的颜色。在 style 的属性中设置。colorControlNormal各控制元件的预设颜色。在 style 的属性中设置windowBackgroundApp 的背景色。在 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">
相关文章推荐
- nginx反代mogilefs实现海量小文件存储
- 关于Ali Muzaffar大神的AnimatedEditText的优化
- 使用TypedArray设置控件大小注意问题
- 关于Qt中QWidget的setParent的使用方法
- [Mac]Mac 操作系统 常见技巧
- 【Angular】理解Angular中的$apply()以及$digest()
- hdoj1878欧拉回路
- uva 532 Dungeon Master(三维bfs)
- 查看远程git log
- 优雅地使用Handler,避免内存溢出、空指针
- 查看远程git log
- 百分比布局PercentRelativeLayout
- 笔记 - 10.4、HTML - CSS滤镜笔记
- struts2学习
- 欢迎使用CSDN-markdown编辑器
- CoordinatorLayout
- CoordinatorLayout
- JavaScript简介
- 自定义的圆形图片(一般用于头像显示部分)
- Markdown编辑表格时如何输入竖线('|', pipe,vertical bar)