Not sure why my onChildClick isn\'t firing. Everything works perfectly, except that when one of the child items is tapped, absolutely nothing happens. Otherwise, the expanda
Be sure to override the isChildSelectable method of your expandable list adapter and return true, like so:
public class MyExpandableListAdapter extends BaseExpandableListAdapter {
...
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}
...
}
Checkbox should not be focuable and clickable ..
<CheckBox
android:focusable="false"
android:clickable="false"
android:focusableInTouchMode="false"
android:id="@+id/expandedListItem"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="?android:attr/expandableListPreferredChildPaddingLeft"
android:paddingTop="10dp"
android:paddingBottom="10dp" />
I got it. All I had to do was add
android:focusable="false"
within the CheckBox section of my expandlist_child_item.xml file.
I hope that this helps somebody.
Checkbox should not be focusable, nor clickable.
I think yu have to use the onItemClickListener and use the passed parameter to see if it is group click or not
Looks all right, still:
Check that you have not set a click listener to any parent view of listview.
Check that isChildSelectable()
of adapter returns true. Also areAllItemsEnabled()
should return true.