private void checkSizeCalcs(int refWidth, int refHeight) { if (colFlowSpecs == null) calcGridSizes(refWidth, refHeight); if ((refWidth > 0 && refWidth != lastRefWidth) || (refHeight > 0 && refHeight != lastRefHeight)) { int[] refBounds = new int[] {0, 0, (refWidth > 0 ? refWidth : width[LayoutUtil.PREF]), (refHeight > 0 ? refHeight : height[LayoutUtil.PREF])}; layoutImpl(refBounds, null, null, false, true); calcGridSizes(refWidth, refHeight); } lastRefWidth = refWidth; lastRefHeight = refHeight; }