minimum += childReqs[axis][i].minimum; preferred += childReqs[axis][i].preferred; maximum += childReqs[axis][i].maximum;
View child = getView(i); min += child.getMinimumSpan(axis); pref += child.getPreferredSpan(axis); max += child.getMaximumSpan(axis);
  protected SizeRequirements calculateMajorAxisRequirements(int axis,                                                           SizeRequirements sr)  {    updateChildRequirements(axis);    SizeRequirements result = sr;    if (result == null)      result = new SizeRequirements();    long minimum = 0;    long preferred = 0;    long maximum = 0;    for (int i = 0; i < children.length; i++)      {        minimum += childReqs[axis][i].minimum;        preferred += childReqs[axis][i].preferred;        maximum += childReqs[axis][i].maximum;      }    // Overflow check.    if (minimum > Integer.MAX_VALUE)      minimum = Integer.MAX_VALUE;    if (preferred > Integer.MAX_VALUE)      preferred = Integer.MAX_VALUE;    if (maximum > Integer.MAX_VALUE)      maximum = Integer.MAX_VALUE;    result.minimum = (int) minimum;    result.preferred = (int) preferred;    result.maximum = (int) maximum;    result.alignment = 0.5F;    return result;  }