Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android options menu is transparent

I have been struggling with this problem for a while. I have no action bar but I do have a options menu. The options menu is transparent I can't get it to be not transparent. This problem arises because of the theme: Theme.AppCompat.Light.DarkActionBar or any like Theme.AppCompact.Light. I have tried many things like setting android:panelFullBackground or similar but they do not work or them make all my screen dark for split-seconds when options menu is out.

I did find a somewhat useful solution which is I extended ActionBarActivity and set the Theme to Theme.AppCompat.Light.NoActionBar but when you press the options menu button you hear the button pressing sound twice.

Please help me. I would like a xml fix or a different (similar though to what I'm using) theme(that works with tabs too).

like image 303
Matthew556 Avatar asked Dec 20 '22 01:12

Matthew556


1 Answers

Change itemBackground parameter in styles.xml

<item name="android:itemBackground">@color/white</item>
like image 129
Khizhny Andrey Avatar answered Mar 02 '23 19:03

Khizhny Andrey