Skip to content Skip to sidebar Skip to footer

Get Group Clicked In OnGroupClickListener

How can I retrieve the group clicked in a OnGroupClickListener of a ExpandableListView. I have tried parent.getItemAtPosition(groupPosition) and it return groups and childs so I th

Solution 1:

Try this:

new OnGroupClickListener() {

    @Override
    public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {

        Object object = parent.getExpandableListAdapter().getGroup(groupPosition);

        ....
        ....

        return true;
    }
}

This should work.


Post a Comment for "Get Group Clicked In OnGroupClickListener"