我將我的應用程序的UI更改爲綠色。在ActionBar中,我使用ShareActionProvider將數據共享給其他用戶,但此菜單項的顏色與其他菜單項不同。但是,其下拉列表視圖具有正確的顏色。修改樣式效果不好
我跑我的薑餅的應用程序,所以當我按下菜單鍵,會出現一個菜單項,但它也有錯誤的顏色。
我用Android Action Bar Style Generator,但有我丟失的東西。這是我在/ RES /值碼:
<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>
是否有任何缺失的項目?在此先感謝
藍色漸變與淺藍色邊框的繪製是你的? –
@RickFalck否,它是從父項繼承的。 – David
所以,你需要找出什麼風格屬性使用它並覆蓋它? –