我正在使用可扩展列表视图并使用 expand.collapse 折叠它,但它会抛出异常 - Arrayindexoutofbound。
ExpandableListView mExpandableList.setOnGroupClickListener(new OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v,
int groupPosition, long id) {
// TODO Auto-generated method stub
if(pause!=1234){
mExpandableList.collapseGroup(pause);
System.out.println(pause+" CLICKED");
}
pause=groupPosition;
return false;
}
});