ExpandableListView child click listener not firing

后端 未结 6 635
感动是毒
感动是毒 2020-12-28 14:47

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

6条回答
  •  难免孤独
    2020-12-28 15:00

    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;
    }
    ...
    }
    

提交回复
热议问题