views:

358

answers:

1

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 well if they click on area for the ListView item other than the checkbox.

+2  A: 

Set all items focusable="false"

jax
Thanks jax, this solves my problem! I just tested, indeed, I don't have to set all items focusable="false", only need to disable focusable on the checkbox.
Echo Lu