public void onGroupExpanded(int groupPosition) { // collapse the old expanded group, if not the same // as new group to expand if (groupPosition != lastExpandedGroupPosition) { this.expandableListView.collapseGroup(lastExpandedGroupPosition); } super.onGroupExpanded(groupPosition); lastExpandedGroupPosition = groupPosition; }
@Override public void onGroupExpanded(int groupPosition) { // collapse the old expanded group, if not the same // as new group to expand Activity mActivity = (Activity) context; ExpandableListView listView = (ExpandableListView) mActivity.findViewById(R.id.exlvHomeListView); if (groupPosition != lastExpandedGroupPosition) { listView.collapseGroup(lastExpandedGroupPosition); } super.onGroupExpanded(groupPosition); lastExpandedGroupPosition = groupPosition; }
@Override public void onGroupExpanded(int groupPosition) { super.onGroupExpanded(groupPosition); if (groupItem.get(groupPosition).isRead() == false) { // Mark the item read if (Constants.LOGD) Log.e(groupItem.get(groupPosition).getGuid(), "check"); groupItem.get(groupPosition).setRead(true); mCallBack = (OnGroupClickListener) ((Activity) context); mCallBack.OnGroupClick(groupPosition, groupItem.get(groupPosition).getGuid(), "read"); // Only one groupview is expanded at one time. If another groupview was expanded, the current // one needs to be collapsed /* ExpandableListView mExpandableListVew=((ExpandableListActivity)context).getExpandableListView(); if (expandedArticle>0&&mExpandableListVew.isGroupExpanded(expandedArticle)){ mExpandableListVew.collapseGroup(expandedArticle); } expandedArticle=groupPosition; */ } }
@Override public void onGroupExpanded(int groupPosition) { super.onGroupExpanded(groupPosition); }