I've styled my action bar to change its background:
<style name="ColoredActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/main_background_color</item>
<item name="background">@color/main_background_color</item>
</style>
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
<item name="actionBarStyle">@style/ColoredActionBar</item>
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
</style>
(I placed different styles on values, values-v11 and values-v14).
I'm trying to change the menu background when state is pressed. I'm doing this:
<item name="actionButtonStyle">@drawable/actionbar_item</item>
and
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="true"
android:drawable="@color/secundary_background_color" />
<item
android:drawable="@color/main_background_color" />
</selector>
but this is not working, it still the same.
How can I do this?
Thanks.