您的位置:首页 > 移动开发 > Android开发

android中,如果使用imageButton可以在drawable 中设置一个selector,但是imageView设置不起作用

2013-09-10 21:05 691 查看
android中,如果使用imageButton可以在drawable 中设置一个selector,但是imageView设置不起作用,只要把Imageview的src给去掉就成了,src捕获了background本应获得焦点导致,具体原因可查看这两者的区别。

<ImageView
android:id="@+id/mute_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="@drawable/ic_mute_selector"
android:clickable="true"
android:contentDescription="@string/app_name"
android:src="@null" />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐