0
我有一个ImageView,我想让它可点击来按下它并更改图像。我用下面的:ImageVIew与状态为棒棒糖版本不起作用?
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:drawable="@drawable/back"/>
<item android:state_pressed="true" android:drawable="@drawable/back_pressed"/>
</selector>
上SrcCompat我把上面的,但没有..
我如何使用XML选择做呢?
“对于棒棒糖版本无法正常工作”....和较低的API? – Opiatefuchs
并且您需要为默认状态或错误状态添加drawable ... – Opiatefuchs