如何在动作栏标题中更改颜色

时间:2016-08-21 18:39:08

标签: java android

我想改变颜色,但不知道怎么样,请帮帮我 现在文字颜色为黑色,但我想将颜色改为白色 在哪里可以阅读它?

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:theme="@android:style/Theme.Dialog" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" app:navigationContentDescription="@string/abc_action_bar_up_description" android:background="?attr/colorPrimary" app:navigationIcon="?attr/homeAsUpIndicator" app:title="@string/action_settings" />

screenshot

2 个答案:

答案 0 :(得分:0)

文件styles.xml或colors.xml具有ActionBar颜色的值。

答案 1 :(得分:0)

默认情况下,您可以在colors.xml属性colorPrimary中更改它。

<color name="colorPrimary">#FFFFFF</color>