您的位置:首页 > 其它

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">


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: