public void flattenHierarchy(ConstraintWidgetContainer root){
  ArrayList<ConstraintWidgetContainer> containers=gatherContainers(root);
  while (containers.size() > 0) {
    for (    ConstraintWidgetContainer container : containers) {
      removeContainer(container);
    }
    containers=gatherContainers(root);
  }
}

public void flattenHierarchy ( ConstraintWidgetContainer root ) { ArrayList < ConstraintWidgetContainer > containers = gatherContainers ( root ) ; while ( containers . size ( ) > 0 ) { for ( ConstraintWidgetContainer container : containers ) { removeContainer ( container ) ; } containers = gatherContainers ( root ) ; } }
flatten the hierachy - - remove all existing containers children of the given container
