你要在.xml文件里面加一个android:state_pressed="false"<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false" android:drawable="@drawable/默认图片" />
<item android:state_pressed="true"
android:drawable="@drawable/bingrenyilan_click" /> <!-- pressed -->
<item android:state_focused="true"
android:drawable="@drawable/bingrenyilan" /> <!-- focused -->
<item android:drawable="@drawable/默认图片" /> <!-- default -->
</selector>
<item android:state_pressed="false" android:drawable="@drawable/默认图片" />
<item android:state_pressed="true"
android:drawable="@drawable/bingrenyilan_click" /> <!-- pressed -->
<item android:state_focused="true"
android:drawable="@drawable/bingrenyilan" /> <!-- focused -->
<item android:drawable="@drawable/默认图片" /> <!-- default -->
</selector>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货