扩展组时,我有一个ExpandableListView
并执行一些操作:
@Override
public void onGroupExpanded(int groupPosition) {
super.onGroupExpanded(groupPosition);
p = (RelativeLayout)activity.findViewById(R.id.pers);
p.setVisibility(View.GONE);
ExpandableListView elw = (ExpandableListView) activity
.findViewById(android.R.id.list);
if (groupPosition != lastExpandedGroupPosition) {
elw.collapseGroup(lastExpandedGroupPosition);
}
lastExpandedGroupPosition = groupPosition;
}
我需要RelativeLayout
在所有组折叠时(或没有组展开时)设置可见。如何检测到所有组当前都已折叠?