private void resetFilterFlags(List<T> items){
  for (int i=0; i < items.size(); i++) {
    T item=items.get(i);
    item.setHidden(false);
    if (isExpandable(item)) {
      IExpandable expandable=(IExpandable)item;
      if (mExpandedFilterFlags != null)       expandable.setExpanded(mExpandedFilterFlags.contains(expandable));
      if (hasSubItems(expandable)) {
        List<T> subItems=expandable.getSubItems();
        for (        T subItem : subItems) {
          subItem.setHidden(false);
          if (expandable.isExpanded()) {
            i++;
            if (i < items.size())             items.add(i,subItem);
 else             items.add(subItem);
          }
        }
      }
    }
  }
  mExpandedFilterFlags=null;
}

private void resetFilterFlags ( List < T > items ) { for ( int i = 0 ; i < items . size ( ) ; i ++ ) { T item = items . get ( i ) ; item . setHidden ( false ) ; if ( isExpandable ( item ) ) { IExpandable expandable = ( IExpandable ) item ; if ( mExpandedFilterFlags != null ) expandable . setExpanded ( mExpandedFilterFlags . contains ( expandable ) ) ; if ( hasSubItems ( expandable ) ) { List < T > subItems = expandable . getSubItems ( ) ; for ( T subItem : subItems ) { subItem . setHidden ( false ) ; if ( expandable . isExpanded ( ) ) { i ++ ; if ( i < items . size ( ) ) items . add ( i , subItem ) ; else items . add ( subItem ) ; } } } } } mExpandedFilterFlags = null ; }
clears flags after searchtext is cleared out for expandable items and sub items .
