我想在Android中将操作栏标题颜色更改为白色,并且我正在使用值主题Theme.AppCompat.Light
和值-14 Theme.AppCompat.Light.DarkActionBar
到目前为止我尝试了以下方法:
在值文件夹中:
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:textColor">@android:color/white</item>
</style>
以及数值为-14的文件夹
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<!-- ActionBar styles -->
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:textColor">@android:color/white</item>
</style>
但 ActionBar 标题颜色未改变。