开发者

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

开发者 https://www.devze.com 2023-03-14 06:24 出处:网络
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 O

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 开发者_JAVA百科on the CheckBox, the onChildClick is not executed!!!

Any solutions or workaround???

Thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消