private void checkDefaultExpand(){
  ArrayMap<Object,List<?>> childArrayMap=new ArrayMap<>();
  Iterator<Object> iterator=mDataList.iterator();
  while (iterator.hasNext()) {
    Object next=iterator.next();
    if (next instanceof ExpandableListItem) {
      ExpandableListItem expandableListItem=(ExpandableListItem)next;
      if (expandableListItem.isExpanded()) {
        List<?> childItemList=expandableListItem.getChildItemList();
        if (childItemList != null && !childItemList.isEmpty()) {
          childArrayMap.put(next,childItemList);
        }
      }
    }
  }
  int size=childArrayMap.size();
  if (size == 0)   return;
  for (int i=0; i < size; i++) {
    Object o=childArrayMap.keyAt(i);
    List<?> objects=childArrayMap.valueAt(i);
    int indexOf=mDataList.indexOf(o);
    mDataList.addAll(indexOf + 1,objects);
  }
}

private void checkDefaultExpand ( ) { ArrayMap < Object , List < ? > > childArrayMap = new ArrayMap < > ( ) ; Iterator < Object > iterator = mDataList . iterator ( ) ; while ( iterator . hasNext ( ) ) { Object next = iterator . next ( ) ; if ( next instanceof ExpandableListItem ) { ExpandableListItem expandableListItem = ( ExpandableListItem ) next ; if ( expandableListItem . isExpanded ( ) ) { List < ? > childItemList = expandableListItem . getChildItemList ( ) ; if ( childItemList != null && ! childItemList . isEmpty ( ) ) { childArrayMap . put ( next , childItemList ) ; } } } } int size = childArrayMap . size ( ) ; if ( size == 0 ) return ; for ( int i = 0 ; i < size ; i ++ ) { Object o = childArrayMap . keyAt ( i ) ; List < ? > objects = childArrayMap . valueAt ( i ) ; int indexOf = mDataList . indexOf ( o ) ; mDataList . addAll ( indexOf + 1 , objects ) ; } }
check has item is expanded by default
