Adding a CheckBox to ListView item prevents it from being able to receive ItemClick
In the Adapter for the ListView, I return a LinearLayout, in which I add a Checkbox, a ImageView and a TextView. This basically constructs a ListView, in which each item contains a Checkbox, a ImageView and a TextView. However the strange thing is that if I don’t add the Checkbox, then ListView receives onItemClick event correctly, as long as I add the Checkbox, onItemClick of the ListView never gets fired again, as if the Checkbox eats all the OnClick event passed to ListView.
Any ideas how can I solve this? I want the user to be able to check/uncheck the Checkboxes and at the same time be able to click on these ListView items as w开发者_如何学Goell if they click on area for the ListView item other than the checkbox.
Set all items focusable="false"
精彩评论