updateChildRequirements(axis); updateRequirements(axis);    SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis], childReqs[axis], offsets, spans);
int count = getViewCount(); for (int i = 0; i < count; i++) { View child = getView(i); int max = (int) child.getMaximumSpan(axis); if (max < targetSpan) {  float align = child.getAlignment(axis); offsets[i] = (int) ((targetSpan - max) * align); spans[i] = max; } else {  int min = (int) child.getMinimumSpan(axis); offsets[i] = 0; spans[i] = Math.max(min, targetSpan); } }
  protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets,                                 int[] spans)  {    updateChildRequirements(axis);    updateRequirements(axis);    // Calculate the spans and offsets using the SizeRequirements uility    // methods.    SizeRequirements.calculateAlignedPositions(targetSpan, requirements[axis],                                               childReqs[axis], offsets,                                               spans);  }