ExpandableListView默认的怎么展开所有的分组

2025-05-08 15:12:58
推荐回答(1个)
回答1:

BaseExpandableListAdapter的notifyDataSetChanged()方法,在方法里面展开所有的分组。

@Override
public void notifyDataSetChanged() {
int groupCount = expandableListView.getCount();
Log.i("-------", "groupCount="+groupCount);
super.notifyDataSetChanged();
for (int i=0; i expandableListView.expandGroup(i);
};
}
转载,仅供参考。