// set the packet to the clicked event ExpandableListView
binding.elvContactGroup.setOnGroupClickListener {parent, _, groupPosition, _ ->
IF (parent.isGroupExpanded (groupPosition)) {
parent.collapseGroup (groupPosition)
} the else {
parent.expandGroup (groupPosition, to false) // The second parameter passed false, no animation
}
true // returns true if the event has consumption, to tell the system does not generate a default action.
}