带有按钮的列表项不再可单击 [英] List item with button not clickable anymore

查看:52
本文介绍了带有按钮的列表项不再可单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个列表项,里面有一个按钮.

I have a list item with a button inside.

显示按钮时,列表项不再可单击. 为了使其再次可单击,我已将按钮替换为视图.问题在于,当单击列表项时,按钮会更改背景图像(就像单击该按钮一样).如何避免这种不良行为?

When the button is shown, the list item is not clickable anymore. To make it clickable again, I have replaced the button with a view. The problem is that, when the list item is clicked, the button changes background image (like if it is clicked). How can avoid this bad behaviour?

谢谢

推荐答案

实际上,我刚刚找到了一个很好的解释: http://android.cyrilmottier.com/?p=525

Actually I have just found a wonderful explaination: http://android.cyrilmottier.com/?p=525

问题和解决方案在这里得到了很好的解释.

The problem and the solution is very well explained there.

这篇关于带有按钮的列表项不再可单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆