public void collapseAllParents(){
  if (mDataList != null && !mDataList.isEmpty()) {
    ArrayList<Object> expandableListItems=getParents(true);
    if (expandableListItems != null && !expandableListItems.isEmpty()) {
      final int expandedItemSize=expandableListItems.size();
      if (expandedItemSize > 0) {
        for (int i=0; i < expandedItemSize; i++) {
          Object o=expandableListItems.get(i);
          int indexOf=mDataList.indexOf(o);
          if (indexOf >= 0)           collapseListItem(indexOf,(BaseExpandableObservable)o,false);
        }
      }
    }
  }
}

public void collapseAllParents ( ) { if ( mDataList != null && ! mDataList . isEmpty ( ) ) { ArrayList < Object > expandableListItems = getParents ( true ) ; if ( expandableListItems != null && ! expandableListItems . isEmpty ( ) ) { final int expandedItemSize = expandableListItems . size ( ) ; if ( expandedItemSize > 0 ) { for ( int i = 0 ; i < expandedItemSize ; i ++ ) { Object o = expandableListItems . get ( i ) ; int indexOf = mDataList . indexOf ( o ) ; if ( indexOf >= 0 ) collapseListItem ( indexOf , ( BaseExpandableObservable ) o , false ) ; } } } } }
collapses all parents in the list .
