selector not working with layout and image view(选择器不适用于布局和图像视图)
本文介绍了选择器不适用于布局和图像视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I want to use selector for a layout and image view..But it is not working for me.
When I changed image view to imagebutton or button, it works fine. Any help will be greatly appreciated.. Thanks in advance..
here is the xmls I used..
The layout xml:
解决方案
I ran into this problem just now. You'll have to set the LinearLayout to clickable. You can either do this in the XML with
Or in code with
这篇关于选择器不适用于布局和图像视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!