Drop-down menu is displayed with a dark background. I tried to change the background in styles, but the menu is simply painted white and no letters are visible. How to make the light background and dark letters so that it does not differ from the general theme of the application?

Menu

<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context=".view.MainActivity"> <item android:id="@+id/action_menu" android:title="@string/menu_title_about" app:showAsAction="collapseActionView" /> <item android:id="@+id/share_menu" android:title="@string/share_the_app" app:showAsAction="collapseActionView" /> <item android:id="@+id/rate_menu" android:title="@string/rate_this_app" app:showAsAction="collapseActionView" /> <item android:id="@+id/action_search" android:icon="@drawable/ic_search" android:title="@string/search" app:showAsAction="ifRoom" /> 

    1 answer 1

    In the xml markup of your toolbar, configure:

     android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:theme="@style/ThemeOverlay.AppCompat.Dark" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" style="@style/Widget.AppCompat.Toolbar" 

    if you use ActionBAr inherit the theme of your application from Light themes