1 <!--button to set the Android:background property by pressing the different effects down,2 The following button_select is actually Button_select.xml -3 4 <Button5 Android:id= "@+id/btn_contentprovider"6 Android:layout_width= "Wrap_content"7 Android:layout_height= "Wrap_content"8 Android:background= "@drawable/button_select"9 Android:text= "Contact without diagram" >Ten </Button>
Button_select.xml:
1 <?XML version= "1.0" encoding= "Utf-8"?>2 <selectorxmlns:android= "Http://schemas.android.com/apk/res/android">3 4 <!--This XML name: Button_select.xml, set the effect of the button press down, is actually a different picture -5 <Itemandroid:drawable= "@drawable/btn_normal"android:state_pressed= "false"></Item>6 <Itemandroid:drawable= "@drawable/btn_pressed"android:state_pressed= "true"></Item>7 8 </selector>
Btn_normal.png:
Btn_pressed.png
The Android Settings button presses the different