Reputation: 1723
I have a ListView containing a checkbox, an imageview, two textviews and a button. The problem is after adding the checkbox and the button the onitemclick event of the ListView is not responding. Will anybody suggest a work around for the problem?
Upvotes: 0
Views: 1562
Reputation: 9258
You can set both android:focusable
and android:focusableInTouchMode
attributes of checkbox to false
and onItemClick
of the list will be called. But you'll have to call CheckBox#toggle()
yourself in onItemClick
.
Upvotes: 5
Reputation: 24031
When you use checkbox
in your listview
then it consumes your click action and your check action will be performed.
You can put click listener over textview, imageview or button. you also need to handle checkbox.
Upvotes: 0
Reputation: 3936
Add an onlick listner to the view. or the checkbox and handle it manually.
Upvotes: 0