当使用状态选择器作为 ImageView
的 src 时,enabled="false"
将被忽略。
即这不能正常工作:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:src="@drawable/state_drawable" >
附言: 我有一个丑陋的解决方法,我会尽快将其作为答案发布,如果您有更好的方法或对此行为的解释,请告诉我。
最佳答案
尝试添加属性android:clickable="true"
关于android - 带有可绘制选择器的 ImageView src 忽略启用状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10429663/