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:

newOnGroupClickListener() {

    @OverridepublicbooleanonGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {

        Objectobject= parent.getExpandableListAdapter().getGroup(groupPosition);

        ....
        ....

        returntrue;
    }
}

This should work.

Post a Comment for "Get Group Clicked In Ongroupclicklistener"