checkbox設置selector的問題

不能單單隻設置status_checked = true  drawable = R.drawable.select_imge而是要設置以下才有效果:android

<item android:state_checked="true" android:state_window_focused="false"
    android:drawable="@mipmap/shoujihao" />
<item android:state_checked="false" android:state_window_focused="false"
    android:drawable="@mipmap/xingming" />

<item android:state_checked="true" android:state_pressed="true"
    android:drawable="@mipmap/shoujihao" />
<item android:state_checked="false" android:state_pressed="true"
    android:drawable="@mipmap/xingming" />

<item android:state_checked="true" android:state_focused="true"
    android:drawable="@mipmap/shoujihao" />
<item android:state_checked="false" android:state_focused="true"
    android:drawable="@mipmap/xingming" />

<item android:state_checked="false"
    android:drawable="@mipmap/xingming" />
<item android:state_checked="true"
    android:drawable="@mipmap/shoujihao" />
相關文章
相關標籤/搜索