Lines Matching refs:spanY

742                     cellInfo.spanY = lp.cellVSpan;
759 cellInfo.spanY = 1;
792 cellInfo.spanY = 0;
868 void regionToCenterPoint(int cellX, int cellY, int spanX, int spanY, int[] result) {
874 (spanY * mCellHeight + (spanY - 1) * mHeightGap) / 2;
884 void regionToRect(int cellX, int cellY, int spanX, int spanY, Rect result) {
890 top + (spanY * mCellHeight + (spanY - 1) * mHeightGap));
1185 * @param spanY The number of vertical cells that the item spans
1188 void estimateDropCell(int originX, int originY, int spanX, int spanY, int[] result) {
1202 int bottomOverhang = result[1] + spanY - countY;
1210 int cellY, int spanX, int spanY, boolean resize, Point dragOffset, Rect dragRegion) {
1259 top += ((mCellHeight * spanY) + ((spanY - 1) * mHeightGap)
1269 cellToRect(cellX, cellY, spanX, spanY, r);
1290 * @param spanY Vertical span of the object.
1296 int[] findNearestVacantArea(int pixelX, int pixelY, int spanX, int spanY,
1298 return findNearestVacantArea(pixelX, pixelY, spanX, spanY, null, result);
1310 * @param spanY Vertical span of the object.
1317 int spanY, int[] result, int[] resultSpan) {
1318 return findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null,
1329 * @param spanY Vertical span of the object.
1336 int[] findNearestArea(int pixelX, int pixelY, int spanX, int spanY, View ignoreView,
1338 return findNearestArea(pixelX, pixelY, spanX, spanY,
1339 spanX, spanY, ignoreView, ignoreOccupied, result, null, mOccupied);
1366 * @param spanY Vertical span of the object.
1373 int[] findNearestArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
1380 // For items with a spanX / spanY > 1, the passed in point (pixelX, pixelY) corresponds
1384 pixelY -= (mCellHeight + mHeightGap) * (spanY - 1) / 2f;
1395 if (minSpanX <= 0 || minSpanY <= 0 || spanX <= 0 || spanY <= 0 ||
1396 spanX < minSpanX || spanY < minSpanY) {
1422 boolean hitMaxY = ySize >= spanY;
1446 hitMaxY |= ySize >= spanY;
1451 hitMaxY = ySize >= spanY;
1506 * @param spanY Vertical span of the object.
1512 * cellY, spanX, spanY) are occupied. This is used when try to move a group of views.
1518 private int[] findNearestArea(int cellX, int cellY, int spanX, int spanY, int[] direction,
1528 for (int y = 0; y < countY - (spanY - 1); y++) {
1533 for (int j = 0; j < spanY; j++) {
1574 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1577 findNearestArea(c.x, c.y, c.spanX, c.spanY, direction, mTmpOccupied, null, mTempLocation);
1584 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
1640 for (int j = cs.y; j < cs.y + cs.spanY; j++) {
1648 for (int j = cs.y; j < cs.y + cs.spanY; j++) {
1663 int bottom = cs.y + cs.spanY;
1681 for (int i = cs.y; i < cs.y + cs.spanY; i++) {
1688 for (int i = cs.y; i < cs.y + cs.spanY; i++) {
1696 if (edge[i] == cs.y + cs.spanY) {
1745 boundingRect.set(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1748 boundingRect.union(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1809 return (r.y + r.spanY) - (l.y + l.spanY);
1856 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1886 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1912 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
1928 boundingRect = new Rect(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1930 boundingRect.union(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1937 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1947 markCellsForView(c.x - left, c.y - top, c.spanX, c.spanY, blockOccupied, true);
1970 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
2076 private boolean rearrangementExists(int cellX, int cellY, int spanX, int spanY, int[] direction,
2082 mOccupiedRect.set(cellX, cellY, cellX + spanX, cellY + spanY);
2092 Rect r0 = new Rect(cellX, cellY, cellX + spanX, cellY + spanY);
2098 r1.set(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
2156 int spanY, int[] direction, View dragView, boolean decX, ItemConfiguration solution) {
2166 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2171 success = rearrangementExists(result[0], result[1], spanX, spanY, direction, dragView,
2177 if (spanX > minSpanX && (minSpanY == spanY || decX)) {
2178 return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX - 1, spanY, direction,
2180 } else if (spanY > minSpanY) {
2181 return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY - 1, direction,
2190 solution.dragViewSpanY = spanY;
2227 lp.cellVSpan = c.spanY;
2228 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
2253 markCellsForView(c.x, c.y, c.spanX, c.spanY, occupied, true);
2272 c.x, c.y, c.spanX, c.spanY);
2292 int spanX, int spanY) {
2293 regionToCenterPoint(cellX0, cellY0, spanX, spanY, mTmpPoint);
2296 regionToCenterPoint(cellX1, cellY1, spanX, spanY, mTmpPoint);
2415 info.spanX != lp.cellHSpan || info.spanY != lp.cellVSpan) {
2421 info.spanY = lp.cellVSpan;
2436 int spanX, int spanY, View dragView, ItemConfiguration solution) {
2439 findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null, result,
2467 int spanY, View dragView, int[] resultDirection) {
2470 findNearestArea(dragViewCenterX, dragViewCenterY, spanX, spanY, targetDestination);
2472 regionToRect(targetDestination[0], targetDestination[1], spanX, spanY, dragRect);
2476 getViewsIntersectingRegion(targetDestination[0], targetDestination[1], spanX, spanY,
2486 int deltaY = (dropRegionRect.centerY() - dragViewCenterY) / spanY;
2491 if (dropRegionSpanY == mCountY || spanY == mCountY) {
2505 private void getViewsIntersectingRegion(int cellX, int cellY, int spanX, int spanY,
2508 boundingRect.set(cellX, cellY, cellX + spanX, cellY + spanY);
2511 Rect r0 = new Rect(cellX, cellY, cellX + spanX, cellY + spanY);
2528 boolean isNearestDropLocationOccupied(int pixelX, int pixelY, int spanX, int spanY,
2530 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2531 getViewsIntersectingRegion(result[0], result[1], spanX, spanY, dragView, null,
2553 boolean createAreaForResize(int cellX, int cellY, int spanX, int spanY,
2556 regionToCenterPoint(cellX, cellY, spanX, spanY, pixelXY);
2559 ItemConfiguration swapSolution = simpleSwap(pixelXY[0], pixelXY[1], spanX, spanY,
2560 spanX, spanY, direction, dragView, true, new ItemConfiguration());
2584 int[] createArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
2587 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2606 getDirectionVectorForDrop(pixelX, pixelY, spanX, spanY, dragView, mDirectionVector);
2612 spanX, spanY, mDirectionVector, dragView, true, new ItemConfiguration());
2616 minSpanY, spanX, spanY, dragView, new ItemConfiguration());
2710 int spanX, spanY;
2719 copy.spanY = spanY;
2722 public CellAndSpan(int x, int y, int spanX, int spanY) {
2726 this.spanY = spanY;
2730 return "(" + x + ", " + y + ": " + spanX + ", " + spanY + ")";
2742 * @param spanY Vertical span of the object.
2749 int pixelX, int pixelY, int spanX, int spanY, View ignoreView, int[] result) {
2750 return findNearestArea(pixelX, pixelY, spanX, spanY, ignoreView, true, result);
2762 * @param spanY Vertical span of the object.
2769 int spanX, int spanY, View ignoreView, int[] result, int[] resultSpan) {
2770 return findNearestArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, ignoreView, true,
2781 * @param spanY Vertical span of the object.
2788 int pixelX, int pixelY, int spanX, int spanY, int[] result) {
2789 return findNearestArea(pixelX, pixelY, spanX, spanY, null, false, result);
2805 * @param spanY The vertical span of the cell we want to find.
2809 boolean findCellForSpan(int[] cellXY, int spanX, int spanY) {
2810 return findCellForSpanThatIntersectsIgnoring(cellXY, spanX, spanY, -1, -1, null, mOccupied);
2819 * @param spanY The vertical span of the cell we want to find.
2823 boolean findCellForSpanIgnoring(int[] cellXY, int spanX, int spanY, View ignoreView) {
2824 return findCellForSpanThatIntersectsIgnoring(cellXY, spanX, spanY, -1, -1,
2833 * @param spanY The vertical span of the cell we want to find.
2840 boolean findCellForSpanThatIntersects(int[] cellXY, int spanX, int spanY,
2843 cellXY, spanX, spanY, intersectX, intersectY, null, mOccupied);
2849 boolean findCellForSpanThatIntersectsIgnoring(int[] cellXY, int spanX, int spanY,
2866 startY = Math.max(startY, intersectY - (spanY - 1));
2868 int endY = mCountY - (spanY - 1);
2870 endY = Math.min(endY, intersectY + (spanY - 1) + (spanY == 1 ? 1 : 0));
2877 for (int j = 0; j < spanY; j++) {
3003 int spanY = (int) Math.ceil(height / (float) smallerSize);
3006 return new int[] { spanX, spanY };
3009 result[1] = spanY;
3035 info.spanX = info.spanY = 1;
3040 info.spanY = spans[1];
3048 * @param spanY Vertical cell span.
3052 public boolean getVacantCell(int[] vacant, int spanX, int spanY) {
3054 return findVacantCell(vacant, spanX, spanY, mCountX, mCountY, mOccupied);
3057 static boolean findVacantCell(int[] vacant, int spanX, int spanY,
3064 for (int j = y; j < y + spanY - 1 && y < yCount; j++) {
3112 private void markCellsForView(int cellX, int cellY, int spanX, int spanY, boolean[][] occupied,
3116 for (int y = cellY; y < cellY + spanY && y < mCountY; y++) {
3315 // its spanX, spanY, and the screen it is on
3324 int spanY;