【发布时间】:2014-12-24 09:12:07
【问题描述】:
我正在使用最新版本的支持库 (V21),其中包括材料主题(在 Theme.AppCompat 名称下),我想将 ActionBar 标题设为白色。我试图通过在我的自定义主题中使用 textColorPrimary(如 there 所示)属性来实现它
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
<item name="colorPrimary">@color/orange</item>
<item name="colorPrimaryDark">@color/orange_dark</item>
<item name="colorAccent">@color/white</item>
<!-- This attribut set text color -->
<item name="android:textColorPrimary">@color/white</item>
</style>
有了这个我得到了一个白色的动作栏标题但所有其他文本(textview,edittext)也是白色的......
有没有办法使用最近发布的功能仅更改操作栏标题颜色,或者唯一的方法是为操作栏使用自定义样式,就像 Holo 的情况一样?
【问题讨论】:
标签: android android-5.0-lollipop android-actionbar-compat