Android 如何使用ActionBar Sherlock更改动作的触感影响颜色?

Android 如何使用ActionBar Sherlock更改动作的触感影响颜色?,android,android-actionbar,actionbarsherlock,android-theme,Android,Android Actionbar,Actionbarsherlock,Android Theme,我有几个动作,所有动作都能正确显示。然而,当我点击动作时,颜色会显示为默认的蓝色,我的应用程序看起来很糟糕。如何更改动作的“选定”颜色 这基本上是的复制品,只是其中一个不涉及ActionBarSherlock 编辑 使用接受的答案,我在调整style.xml 错误是错误:检索项的父项时出错:未找到与给定名称“主题”匹配的资源。 我将它输入到我的style.xml文件中,如下所示。在Sherlock library/res/values/abs_themes.xml文件中,样式名称与我的完全匹配

我有几个动作,所有动作都能正确显示。然而,当我点击动作时,颜色会显示为默认的蓝色,我的应用程序看起来很糟糕。如何更改动作的“选定”颜色

这基本上是的复制品,只是其中一个不涉及ActionBarSherlock

编辑

使用接受的答案,我在调整
style.xml

错误是
错误:检索项的父项时出错:未找到与给定名称“主题”匹配的资源。

我将它输入到我的
style.xml
文件中,如下所示。在Sherlock library
/res/values/abs_themes.xml
文件中,样式名称与我的完全匹配

嗯,ABS使用(几乎)与默认ActionBar相同的API,所以只需更改(重复)答案的主题如下:

<style name="myStyle" parent="Theme.Sherlock">    
     <item name="android:selectableItemBackground">@android:drawable/item_background_holo_dark</item>
     <item name="selectableItemBackground">@android:drawable/item_background_holo_dark</item>
</style>

@android:可绘制/项目\背景\全息\深色
@android:可绘制/项目\背景\全息\深色
可抽出式:

<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">

<item android:drawable="@drawable/list_selector_disabled_holo_dark" android:state_enabled="false" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/list_selector_disabled_holo_dark" android:state_enabled="false" android:state_focused="true"/>
<item android:drawable="@drawable/list_selector_background_transition_holo_dark" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/list_selector_background_transition_holo_dark" android:state_focused="false" android:state_pressed="true"/>
<item android:drawable="@drawable/list_focused_holo" android:state_focused="true"/>
<item android:drawable="@color/transparent"/>

</selector>


您只需从
Theme.Sherlock
继承您的样式,并设置另一个
selectableItemBackground
属性,但前面没有
android:

好的,谢谢,不过我以前从未处理过这样的样式文件。它去哪里了?我看到某个地方应该有一个
res/styles/
目录,但我没有。这是因为我使用的是较低的API吗?不是。只是在res/values/there中,你应该有一个styles.xml文件。对不起,我仍然无法让它工作。我用更多的信息编辑了我的问题,如果你有时间的话,我会得到错误。我刚刚回到这个项目,有一个关于这个的小问题。我创建了一个可绘制文件,然后调用了一些类似于
actionBar.setBackgroundDrawable(drawable\u file.xml)