Hassaan Rabbani
Hassaan Rabbani

Reputation: 2465

How can we add background Color to the options menu in android

Options menu has a default color i.e White, I want to change this color to GREEN. Right now i have tried to add a drawable to my menu item to change its color, but its not working, here is the menu.xml code

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" 

    >

    <item
        android:icon="@drawable/character"
        android:id="@+id/icon12"
        android:title="test"

         />
    <item
        android:id="@+id/text"
        android:title="Text"/>
    <item
        android:id="@+id/icon1"
        android:title="Icon and Text"
        android:icon="@drawable/item_selector"/>

    <item android:id="@+id/about"
      android:icon="@drawable/action"
      android:title="about"
       /> 
</menu>

It does not change the background of the menu item. Any Answers would be appreciated.

I have tried many things, e.g hackandroid etc but nothing seemed to work properly.

Upvotes: 0

Views: 3273

Answers (1)

DroidT
DroidT

Reputation: 3293

Here is an artcile that describes customizing the look of the menu that I found useful.

Upvotes: 3

Related Questions