SizeRequirements.calculateAlignedPositions(span, requirements[axis], childReqs[axis], offsets, spans);
int count = getViewCount(); for (int i = 0; i < count; i++) { View v = getView(i); float align = v.getAlignment(axis); int viewSpan; if (v.getResizeWeight(axis) > 0) {  int min = (int) v.getMinimumSpan(axis); int max = (int) v.getMaximumSpan(axis); if (align == 0.0F) viewSpan = Math.max(Math.min(max, totalDescent), min); else if (align == 1.0F) viewSpan = Math.max(Math.min(max, totalAscent), min); else { int fit = (int) Math.min(totalAscent / align, totalDescent / (1.0F - align)); viewSpan = Math.max(Math.min(max, fit), min); } } else viewSpan = (int) v.getPreferredSpan(axis); offsets[i] = totalAscent - (int) (viewSpan * align); spans[i] = viewSpan; }
  protected void baselineLayout(int span, int axis, int[] offsets,                                int[] spans)  {    updateChildRequirements(axis);    updateRequirements(axis);    // Calculate the spans and offsets using the SizeRequirements uility    // methods.    SizeRequirements.calculateAlignedPositions(span, requirements[axis],                                               childReqs[axis], offsets, spans);  }