I defined the following style for my app:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="AppTheme.Base">
</style>
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimaryDark">@color/primaryColorDark</item>
<item name="colorPrimary">@color/primaryColor</item>
<item name="colorAccent">@color/accentColor</item>
<item name="android:textColorPrimary">@color/textcolorsecundary</item>
<item name="android:textColorSecondary">@color/textcolorsecundary</item>
<item name="android:popupMenuStyle">@style/AppTheme.Base.PopupMenu</item>
</style>
<style name="AppTheme.Base.PopupMenu" parent="Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">@color/primaryColor</item>
</style>
</resources>
Unfortunately the style for the background of the popup menu (for example in the options menu) does not change at all. The text color is set correclty but the popupBackground
is totally ignored it stays always white.
So how can i change it to my color?
EDIT
Maybe it is a problem that i use a custom toolbar?
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primaryColor"
app:theme="@style/AppTheme" />