2

I am using a .png for both my logo and action Bar menu items. I am using the android.Holo.light theme.

Even though I've made the background transparent for both the logo and the menu items, a grey shaded area is still showing behind the .png. How do I change this?

Take a look at my menu XML and my style override XML below.

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <style name="MyTheme" parent="android:Theme.Holo.Light">
     <item name="android:selectableItemBackground">@color/transparent</item>
     <item name="android:background">#00000000</item>
  </style>

  <style name="ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar" >
      <item name="android:selectableItemBackground">@color/transparent</item>
      <item name="android:background">#00000000</item>

  </style>

  <style name="textTitle" 
      parent="@android:style/TextAppearance">
    <item name="android:textSize">20dp</item>
    <item name="android:textColor">#DC0451</item>
    <item name="android:textStyle">bold</item>
  </style>


   <style name="textDescription" 
      parent="@android:style/TextAppearance">
    <item name="android:textSize">15dp</item>
    <item name="android:textColor">#666666</item>
  </style>
</resources>
  • Menu xml

        <item 
            android:id="@+id/Category"
            android:title="Category"
            android:showAsAction="always|withText"
            android:icon="@drawable/menuitemselect"
            style="@style/ActionBar"
    
            > 
             <menu>
                  <item     
                    android:id="@+id/catalog"
                    android:title="Main Catalog"
                    android:icon="@drawable/menuitemselect"
                    android:onClick="catalogClick"
                />
                <item android:id="@+id/newvideos"
                    android:title="New"
                    android:icon="@drawable/menuitemselect"
                    android:onClick="newVideoClick"
                    style="@style/ActionBar"
                />
    
    
                 <item 
                    android:id="@+id/popularvideos"
                    android:title="Popular"
                    android:icon="@drawable/menuitemselect" 
                    android:onClick="popularVideoClick"
                    style="@style/ActionBar"
                 />
    
             </menu>
    
      </item>
    
                <item android:id="@+id/backButton"
                    android:title="Back"
                    android:showAsAction="ifRoom"
                    android:icon="@drawable/ic_launcher"
                />
    
    </menu>
    

Thank you

Fabii
  • 3,820
  • 14
  • 51
  • 92

1 Answers1

2

I found that the issue was with :

 <item name="android:selectableItemBackground">@color/transparent</item>.

I added it in an attempt to get rid of default highlight feature. It seems when I have this set, the grey background shows up. When I remove it, it acts as it should.

Fabii
  • 3,820
  • 14
  • 51
  • 92