好吧,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>
和可绘制的:
<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:
前面的。