Vikram
Vikram

Reputation: 12261

Clicking a checkbox on an ExpandableListView does not trigger the onChildClick event

I have an ExpandableListView which contains a list of rows with CheckBox and TextView.

I have managed get the row selectable by setting the checkbox focusable attribute to false. I have also added a OnChildClickListener to my ExpandableListView.

When i click on the TextView or any other region, the onChildClick is executed fine. But, the trouble is, when i click on the CheckBox, the onChildClick is not executed!!!

Any solutions or workaround???

Thanks

Upvotes: 1

Views: 765

Answers (1)

Steve Bergamini
Steve Bergamini

Reputation: 14600

What you may want to do here is set the clickable attribute of the checkbox as false. Then, you can programmatically check and uncheck the checkbox in your code with whatever else you need to do.

Upvotes: 1

Related Questions