Android – Actionbar button background

androidandroid-actionbaricons

I want to customize actionbar buttons with an image both for pressed and not pressed state. I put a drawable selector on android:icon with two states (pressed and not pressed). The problem is that, if I press the button, I still have the blue background (ics holo style) along with my pressed button icon. How can I remove this behaviour from actionbar customized icon buttons?

Thanks

Best Answer

I think the more specific way is to put this attribute in your application Theme:

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

Also put this if you're using ActionBarSherlock:

    <item name="actionBarItemBackground">@android:color/transparent</item>
Related Topic