protected void layoutMinorAxis(int targetSpan,int axis,int[] offsets,int[] spans){
  int n=getViewCount();
  for (int i=0; i < n; i++) {
    View v=getView(i);
    int max=(int)v.getMaximumSpan(axis);
    if (max < targetSpan) {
      float align=v.getAlignment(axis);
      offsets[i]=(int)((targetSpan - max) * align);
      spans[i]=max;
    }
 else {
      int min=(int)v.getMinimumSpan(axis);
      offsets[i]=0;
      spans[i]=Math.max(min,targetSpan);
    }
  }
}

protected void layoutMinorAxis ( int targetSpan , int axis , int [ ] offsets , int [ ] spans ) { int n = getViewCount ( ) ; for ( int i = 0 ; i < n ; i ++ ) { View v = getView ( i ) ; int max = ( int ) v . getMaximumSpan ( axis ) ; if ( max < targetSpan ) { float align = v . getAlignment ( axis ) ; offsets [ i ] = ( int ) ( ( targetSpan - max ) * align ) ; spans [ i ] = max ; } else { int min = ( int ) v . getMinimumSpan ( axis ) ; offsets [ i ] = 0 ; spans [ i ] = Math . max ( min , targetSpan ) ; } } }
performs layout for the minor axis of the box ( i . e . the axis orthogonal to the axis that it represents ) . the results of the layout ( the offset and span for each children ) are placed in the given arrays which represent the allocations to the children along the minor axis .
