style.xml
<?xml version="1.0" encoding="utf-8"?><resources><style name= "AppTheme" parent= "android:Theme.Holo.Light" ><item name= "android:actionButtonStyle" >@style/App.Widget.ActionButton </item> <!-- 背景色 --> <item name="android:actionMenuTextColor">@color/menu_text_color_holo_dark</item> <!-- 文字颜色 --></style><style name= "App.Widget.ActionButton" parent= "android:style/Widget.Holo.ActionButton" ><item name= "android:background" >@drawable/action_button_background </item></style></resources> action_button_background.xml<?xml version="1.0" encoding="utf-8"?><selector xmlns:android= "http://schemas.android.com/apk/res/android" ><item android:state_focused= "false" android:state_pressed= "false" ><shape android:shape= "rectangle" ><solid android:color= "@android:color/black" /></shape></item><item android:state_pressed= "true" ><shape android:shape= "rectangle" ><solid android:color= "@android:color/holo_blue_bright" /></shape></item></selector>menu_text_color_holo_dark.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="#ffffffff"/> <item android:color="#ffffffff"/> </selector>
请参考:https://gist.github.com/noxi515/9053201