Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

expandablelistview is not getting expanded when checkbox is added in parent xml

I have developed the sample code of ExpandableListView in android. Data is being populated in Adapter and displaying in the ExpandableListView properly. but i am facing one severe issue of not expanding child view after tapping on Groupview.

The problem is when i add check box to the xml(parent xml) that is inflated in getgroupView() method child view does not get expanded after tapping Groupview.But, if checkbox is removed from the xml all works well.

Similar question has been posted in StackOverflow, but nothing seems to work.

like image 744
Amala Ray Avatar asked Nov 22 '25 12:11

Amala Ray


1 Answers

If you place an item that is focusable in a list, then the list items no longer respond to clicks

Try to set the CheckBox android:focusable attribute to false.

like image 152
Subramanian Ramsundaram Avatar answered Nov 25 '25 03:11

Subramanian Ramsundaram



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!