我想在其中更改动作模式背景和标题颜色。我试过this但没有任何改变
这是我的styles.xml文件
<style name="AppBaseTheme" parent="android:Theme.Light"></style>
<style name="AppTheme" parent="AppBaseTheme"></style>
<style name="LiveoActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/LiveoActionBar</item>
</style>
<style name="LiveoActionBar" parent="@style/Widget.AppCompat.ActionBar">
<item name="titleTextStyle">@style/Liveo.TitleTextStyle</item>
<item name="subtitleTextStyle">@style/Liveo.SubTitleTextStyle</item>
<item name="background">@color/green_google_play</item>
</style>
<style name="Liveo.TitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">@color/white</item>
<item name="android:textStyle">normal</item>
</style>
<style name="Liveo.SubTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle">
<item name="android:textColor">@color/white</item>
<item name="android:textStyle">normal</item>
</style>
<style name="menu_labels_style">
<item name="android:background">@drawable/fab_label_background</item>
<item name="android:textColor">@color/white</item>
</style>
</resources>
答案 0 :(得分:0)
按如下所示更新您的代码并尝试
<style name="LiveoActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/LiveoActionBar</item>
</style>
<style name="LiveoActionBar" parent="@style/Widget.AppCompat.ActionBar">
<item name="android:titleTextStyle">@style/Liveo.TitleTextStyle</item>
<item name="android:subtitleTextStyle">@style/Liveo.SubTitleTextStyle</item>
<item name="android:background">@color/green_google_play</item>
</style>