我希望我的团队能够在第一时间扩大。然后它应该像往常一样运行(单击指示器后折叠/展开)
我找不到解决此问题的任何有效解决方案。
最佳答案
循环遍历所有组并使用expandGroup()您的 ExpandableListView 的:
ExpandableListView expView = (ExpandableListView) findViewById(R.id.expView);
ExpandableRecAdapter expAdapter = new ExpandableRecAdapter(this, expHeaders, expItems);
expView.setAdapter(expAdapter);
for (int i = 0; i < expAdapter.getGroupCount(); i++)
expView.expandGroup(i);
(或者查看其他 StackOverflow 问题,例如:ExpandableListview How to Auto groupExpand - Android)
关于java - ExpandableListView 中最初展开的组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12029758/