public void unwrap(LinearLayout wrappedLayout){
  int count=wrappedLayout.getChildCount();
  for (int i=0; i < count; i++) {
    LinearLayout row=(LinearLayout)wrappedLayout.getChildAt(i);
    row.removeAllViews();
  }
  wrappedLayout.removeAllViews();
}

public void unwrap ( LinearLayout wrappedLayout ) { int count = wrappedLayout . getChildCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { LinearLayout row = ( LinearLayout ) wrappedLayout . getChildAt ( i ) ; row . removeAllViews ( ) ; } wrappedLayout . removeAllViews ( ) ; }
fully unwraps the given layout . the children are cleanly removed from the row layouts so that they can be re - attached elsewhere . then , the row layouts themselves are removed from the linear layout .
