Styles
<style name= "Buttongreen" parent= "@android: Style/widget.button" > <item name= "Android:textsize" > 18.0sp</item> <item name= "Android:textcolor" > @drawable/skin_color_button</item> < Item Name= "Android:background" > @drawable/common_btn_green</item> </style>
Drawable:skin_color_button
Drawable:common_btn_green
<?xml version= "1.0" encoding= "Utf-8"? ><selector xmlns:android= "http://schemas.android.com/apk/res/ Android "> <item android:drawable=" @drawable/skin_common_btn_green_pressed "android:state_pressed=" true "/> <item android:drawable=" @drawable/skin_common_btn_green_disable "android:state_enabled=" false "/ > <item android:drawable= "@drawable/skin_common_btn_green_normal"/></selector>
button
<button android:id= "@+id/reset_btn" style= "@style/buttonred" android:layout_width= "0.0dip" android:layout_height= "Wrap_content" android:layout_margin= "15dip" android:layout_weight= "1" android:gravity= "center" android:text= "Ceshi"/>
Android Button Press effect (text color and button change simultaneously)