我已经实现了以下代码:
explistView.setOnGroupCollapseListener(new OnGroupCollapseListener() {
public void onGroupCollapse(int id){
ExpandableListView expand=(ExpandableListView) mView.findViewById(R.id.explistview);
expand.expandGroup(id);
}
});
仍在UI上刷新可展开列表正在折叠。请帮忙。
答案 0 :(得分:0)
尝试使用getGroupView
方法,如下所示
@Override
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
View v = super.getGroupView(groupPosition, isExpanded, convertView, parent);
ExpandableListView eListView = (ExpandableListView) parent;
eListView.expandGroup(groupPosition);
return v;
}
我希望这会对你有所帮助