【问题标题】:how to change color in actionbar title如何更改操作栏标题中的颜色
【发布时间】:2016-08-21 18:39:08
【问题描述】:

我想换颜色,但不知道怎么做,请帮帮我 现在文本颜色为黑色,但我想将颜色更改为白色 我在哪里可以读到它?

<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

【问题讨论】:

标签: java android


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 2013-04-20
      • 1970-01-01
      • 2015-02-03
      • 2015-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-13
      • 2014-12-24
      相关资源
      最近更新 更多