Now the background color of the menu is black. I wanted to change it to green. I tried android:background="#00FF00" . Does not change.

 <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=".MainActivity" android:background="#00FF00" > <item android:id="@+id/newrent" android:title="@string/action_new_rent" app:showAsAction="never"/> <item android:id="@+id/deleteme" android:title="@string/action_delete_me" app:showAsAction="never"/> </menu> 

    1 answer 1

    The color of the background menu must be specified in the styles.xml styles

     <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> ... <item name="android:itemBackground">@color/green</item> ... </style>