I'm trying to change the default color for the options menu which is white: I want a black background for every item on the options menu.
I've tried some shoots like android:itemBackground="#000000" on the item element within the menu element but it didn't work.
How can I accomplish this?
Select Start > Settings > Personalization > Colors, and then choose your own color, or let Windows pull an accent color from your background.
Just go to res/values/styles.edit the xml file to change the color of action bar.
After spending a considerable amount of time trying all the options, the only way I was able to get an app using AppCompat v7 to change the overflow menu background was using the itemBackground attribute:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> ... <item name="android:itemBackground">@color/overflow_background</item> ... </style>
Tested from API 4.2 to 5.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With