Refactored code for Group and Child for ExpandableListView.