onListItemClick method not called when I use Checkox in list

痞子三分冷 提交于 2019-12-06 04:53:49

To make it working you can set Checkboxes and other fields in the ListItem unclickable and unfocusable, by properties:

android:clickable="false"
android:focusable="false"

Make sure you set the checkbox as not focusable in the adapter class, like this:

        yourCheckbox.setFocusable(false);

And in the xml file as well:

        android:focusable="false"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!