int count = getViewCount(); SizeRequirements[] childReqs = new SizeRequirements[count]; for (int i = 0; i < count; ++i) { View view = getView(i); childReqs[i] = new SizeRequirements((int) view.getMinimumSpan(axis), (int) view.getPreferredSpan(axis), (int) view.getMaximumSpan(axis), view.getAlignment(axis)); }
SizeRequirements[] childReqs = getChildRequirements(axis);
  protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets,                                 int[] spans)  {    // Allocate SizeRequirements for each child view.    int count = getViewCount();    SizeRequirements[] childReqs = new SizeRequirements[count];    for (int i = 0; i < count; ++i)      {        View view = getView(i);        childReqs[i] = new SizeRequirements((int) view.getMinimumSpan(axis),                                            (int) view.getPreferredSpan(axis),                                            (int) view.getMaximumSpan(axis),                                            view.getAlignment(axis));      }    // Calculate the spans and offsets using the SizeRequirements uility    // methods.    SizeRequirements.calculateAlignedPositions(targetSpan, null, childReqs,                                               offsets, spans);    validateLayout(axis);  }