int[] updateLayoutArray(int[] oldArray,int offset,int nInserted){
  int n=getViewCount();
  int[] newArray=new int[n];
  System.arraycopy(oldArray,0,newArray,0,offset);
  System.arraycopy(oldArray,offset,newArray,offset + nInserted,n - nInserted - offset);
  return newArray;
}

int [ ] updateLayoutArray ( int [ ] oldArray , int offset , int nInserted ) { int n = getViewCount ( ) ; int [ ] newArray = new int [ n ] ; System . arraycopy ( oldArray , 0 , newArray , 0 , offset ) ; System . arraycopy ( oldArray , offset , newArray , offset + nInserted , n - nInserted - offset ) ; return newArray ; }
resizes the given layout array to match the new number of child views . the current number of child views are used to produce the new array . the contents of the old array are inserted into the new array at the appropriate places so that the old layout information is transferred to the new array .
