我想在填充可扩展列表视图时扩展所有子级。目前,我的代码如下所示:
ExpandableListView listView = (ExpandableListView) findViewById(R.id.view);
int count = viewAdapted.getGroupCount();
for (int position = 1; position <= count; position++)
listView.expandGroup(position - 1);
这很丑。有更好的方法吗?