![](/img/trans.png)
[英]How to change the title text color and the color of the background on the ActionBar?
[英]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
屬性colorPrimary
中colors.xml
colorPrimary
。
<color name="colorPrimary">#FFFFFF</color>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.