簡體   English   中英

如何在操作欄標題中更改顏色

[英]how to change color in actionbar title

我想更改顏色,但不知道如何,請幫助我現在將文本顏色更改為黑色,但是我想將顏色更改為白色,以便我可以閱讀?

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

屏幕截圖

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

默認情況下,您可以在colors.xml屬性colorPrimarycolors.xml colorPrimary

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM