Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make the Android options menu background non-translucent?

Tags:

android

The options menu has a translucent background and I would like to make it solid and non-transparent. Is there a way?

like image 614
Don Avatar asked Jul 10 '10 04:07

Don


People also ask

How do I change the background color of a menu item?

To add background and text color of overflow menu just add two line of more code android:textColor and itemBackground in your project styles. xml file.

What is transparent color in Android?

TRANSPARENT (which represents the same thing as @android:color/transparent ) is equal to 0 . The hex representation of 0 is #00000000 , which means that Color. TRANSPARENT is essentially a completely transparent Color.


2 Answers

Try this:

<style name="MyTheme" parent="android:Theme">
     <item name="android:panelFullBackground">{your color or drawable}</item>
</style>

Also, see:

  • http://code.google.com/p/android/issues/detail?id=4441
  • How to change the background color of the options menu?
  • Completely overriding menu panel: Android MenuItem Toggle Button
like image 172
aeracode Avatar answered Oct 23 '22 00:10

aeracode


set android:theme="myTheme", and define your own theme with whatever colours you want. Read up about Styles, and look at the android themes.xml.

like image 2
fredley Avatar answered Oct 23 '22 02:10

fredley