Changing the color of the background menu in Android

The menu icons of my application where not displayed on my real Android device, so I ended up changing the menu background color, before coming up with a better approach.

Note: this post is only about changing the menu background color. If you want to change other things like the text color, check this stackoverflow post.

in [PROJECT_HOME]/res/values/styles.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
   <style name="MyTheme" parent="android:Theme">
      <item name="android:panelFullBackground">@android:color/darker_gray</item>
   </style>
</resources>

In AndroidManifest.xlm:

<application
   android:label="@string/app_name"
   android:icon="@drawable/ic_launcher"
   android:theme="@style/MyTheme">

Laurent KUBASKI

Advertisements

About lkubaski
www.kubaski.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: