问题
Can't seem to style the ActionMode background.
I've already overridden actionbar background but setting the ActionMode background doesn't seem to work:
<style name="Theme.apptheme" parent="@style/Theme.Sherlock.Light.DarkActionBar">
...
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="actionModeBackground">@drawable/actionmode_background</item>
<item name="actionModeSplitBackground">@drawable/actionmode_split</item>
...
</style>
Any idea how to accomplish this?
回答1:
You're likely testing on ICS or JB, and therefore will not see any difference. You must also include these tags using the android:
namespace.
E.g.
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionModeBackground">@drawable/actionmode_background</item>
<item name="android:actionModeSplitBackground">@drawable/actionmode_split</item>
来源:https://stackoverflow.com/questions/12711612/styling-sherlock-actionmode-background