I know there are many questions with this title , but my problem did not solved yet.
I used ActionBar Compact for implementing actionbar.
Now , i want to change its selector (item highlight) color.
I used this code for selector:
<item android:state_window_focused="false" android:drawable="@color/MyColor_Transparent" />
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/myforebackground_green" />
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/myforebackground_green" />
<item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/mybackground_b" />
<item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/mybackground_b" />
<item android:state_focused="true" android:drawable="@drawable/mybackground_b" />
<item android:drawable="@color/MyColor_Transparent" />
And also used:
<item name="android:selectableItemBackground">@drawable/my_selector</item>
In styles.xml
But it didn't work.
I used this links too:
how can i change the touch affect color of actions with actionbarsherlock
actionbarcompat support library android selectable item background not working
But it still not working.