1.通過圖片進行切換
效果圖 平時:
點擊時: 
2.設置一個button
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/button_selectors"/>
3.在drawable下建立button_selectors.xml文件

4.在drawable中分別放兩個圖片clr_normal.png 和 clr_pressed.png兩張圖片(對應上圖)
5.代碼編寫,輸入如下代碼。運行程序即可!

