I have a styled theme in values/styles.xml
like this, project compiled and targetting Android 21:
<style name="Theme.Styled" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#99ba64</item>
<item name="colorPrimaryDark">#558B2F</item>
<item name="colorAccent">#76FF03</item>
<item name="android:actionBarItemBackground">@drawable/selectable_background</item>
<item name="android:actionBarTabStyle">@style/Widget.Styled.ActionBar.TabView</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionDropDownStyle">@style/Widget.Styled.Spinner.DropDown.ActionBar</item>
<item name="android:dropDownListViewStyle">@style/Widget.Styled.ListView.DropDown</item>
<item name="android:popupMenuStyle">@style/Widget.Styled.PopupMenu</item>
</style>
action bar works with styled background color on all devices, but some colors such as for popupmenu
or navspinner
are missed. It seems as android:popupMenuStyle
or android:actionDropDownStyle
are ignored. Why? Thanks.
If you're targetting API 21, then you can't use
Theme.AppCompat.Light.DarkActionBar
- it doesn't exist.Read this Chris Banes blog post about AppCompat v21.