我正在将我的应用程序的 UI 更改为绿色。在 ActionBar 中,我使用 ShareActionProvider 与其他用户共享数据,但此菜单项的颜色与其他菜单项不同。但是,它的下拉列表视图具有正确的颜色。
我在 GingerBread 中运行我的应用程序,所以当我按下菜单键时,会出现一个菜单项,但它的颜色也错误。
我使用过Android Action Bar Style Generator,但我缺少一些东西。这是我在 /res/values 中的代码:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- the theme applied to the application or activity -->
<style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarItemBackground">@drawable/selectable_background_newtheme</item>
<item name="actionBarStyle">@style/ActionBar.Solid.NewTheme</item>
<item name="popupMenuStyle">@style/PopupMenu.NewTheme</item>
<item name="dropDownListViewStyle">@style/DropDownListView.NewTheme</item>
<item name="actionDropDownStyle">@style/DropDownNav.NewTheme</item>
<!-- Light.DarkActionBar specific -->
<item name="actionBarWidgetTheme">@style/NewTheme.Widget</item>
</style>
<!-- ActionBar style -->
<style name="ActionBar.Solid.NewTheme" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="background">@drawable/action_bar_gradient</item>
</style>
<style name="PopupMenu.NewTheme" parent="@style/Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">@drawable/background_gradient</item>
</style>
<style name="DropDownListView.NewTheme" parent="@style/Widget.AppCompat.ListView.DropDown">
<item name="android:listSelector">@drawable/selectable_background_newtheme</item>
</style>
<style name="DropDownNav.NewTheme" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:background">@drawable/spinner_background_ab_newtheme</item>
<item name="android:dropDownSelector">@drawable/selectable_background_newtheme</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="NewTheme.Widget" parent="@style/Theme.AppCompat">
<item name="popupMenuStyle">@style/PopupMenu.NewTheme</item>
<item name="dropDownListViewStyle">@style/DropDownListView.NewTheme</item>
</style>
有没有遗漏的物品?提前致谢