Source ActionBar selectableItemBackground with ActionBarSherlock

I am trying to change the background of a selected item in an ActionBar. I use ActionBarSherlock for compatibility with older versions of Android. I set a specific theme for my activity when the application runs on a device with ICS.

This is my current style:

<style name="Theme.Custom.Light" parent="@android:style/Theme.Holo.Light.DarkActionBar"> <item name="android:actionBarItemBackground">@drawable/abs__item_background_holo_dark</item> <item name="android:selectableItemBackground">@drawable/abs__item_background_holo_dark</item> </style> 

My available one is as follows:

 <selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime"> <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_disabled_holo_dark" /> <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abs__list_selector_disabled_holo_dark" /> <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_dark" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abs__list_selector_background_transition_holo_dark" /> <item android:state_focused="true" android:drawable="@drawable/abs__list_focused_holo" /> <item android:drawable="@android:color/transparent" /> </selector> 

It seems that the attribute will not be overridden. What am I wrong?

+4
source share
1 answer

I found myselft solution. I just forgot to copy png to my drawable-mdpi and drawable-xhdpi folder.

0
source

All Articles