Lines Matching defs:spanY

728                     cellInfo.spanY = lp.cellVSpan;
745 cellInfo.spanY = 1;
778 cellInfo.spanY = 0;
854 void regionToCenterPoint(int cellX, int cellY, int spanX, int spanY, int[] result) {
860 (spanY * mCellHeight + (spanY - 1) * mHeightGap) / 2;
870 void regionToRect(int cellX, int cellY, int spanX, int spanY, Rect result) {
876 top + (spanY * mCellHeight + (spanY - 1) * mHeightGap));
1164 * @param spanY The number of vertical cells that the item spans
1167 void estimateDropCell(int originX, int originY, int spanX, int spanY, int[] result) {
1181 int bottomOverhang = result[1] + spanY - countY;
1189 int cellY, int spanX, int spanY, boolean resize, Point dragOffset, Rect dragRegion) {
1234 top += ((mCellHeight * spanY) + ((spanY - 1) * mHeightGap)
1244 cellToRect(cellX, cellY, spanX, spanY, r);
1265 * @param spanY Vertical span of the object.
1271 int[] findNearestVacantArea(int pixelX, int pixelY, int spanX, int spanY,
1273 return findNearestVacantArea(pixelX, pixelY, spanX, spanY, null, result);
1285 * @param spanY Vertical span of the object.
1292 int spanY, int[] result, int[] resultSpan) {
1293 return findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null,
1304 * @param spanY Vertical span of the object.
1311 int[] findNearestArea(int pixelX, int pixelY, int spanX, int spanY, View ignoreView,
1313 return findNearestArea(pixelX, pixelY, spanX, spanY,
1314 spanX, spanY, ignoreView, ignoreOccupied, result, null, mOccupied);
1341 * @param spanY Vertical span of the object.
1348 int[] findNearestArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
1355 // For items with a spanX / spanY > 1, the passed in point (pixelX, pixelY) corresponds
1359 pixelY -= (mCellHeight + mHeightGap) * (spanY - 1) / 2f;
1370 if (minSpanX <= 0 || minSpanY <= 0 || spanX <= 0 || spanY <= 0 ||
1371 spanX < minSpanX || spanY < minSpanY) {
1397 boolean hitMaxY = ySize >= spanY;
1421 hitMaxY |= ySize >= spanY;
1426 hitMaxY = ySize >= spanY;
1481 * @param spanY Vertical span of the object.
1487 * cellY, spanX, spanY) are occupied. This is used when try to move a group of views.
1493 private int[] findNearestArea(int cellX, int cellY, int spanX, int spanY, int[] direction,
1503 for (int y = 0; y < countY - (spanY - 1); y++) {
1508 for (int j = 0; j < spanY; j++) {
1549 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1552 findNearestArea(c.x, c.y, c.spanX, c.spanY, direction, mTmpOccupied, null, mTempLocation);
1559 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
1615 for (int j = cs.y; j < cs.y + cs.spanY; j++) {
1623 for (int j = cs.y; j < cs.y + cs.spanY; j++) {
1638 int bottom = cs.y + cs.spanY;
1656 for (int i = cs.y; i < cs.y + cs.spanY; i++) {
1663 for (int i = cs.y; i < cs.y + cs.spanY; i++) {
1671 if (edge[i] == cs.y + cs.spanY) {
1720 boundingRect.set(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1723 boundingRect.union(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1784 return (r.y + r.spanY) - (l.y + l.spanY);
1831 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1861 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1887 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
1903 boundingRect = new Rect(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1905 boundingRect.union(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1912 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1922 markCellsForView(c.x - left, c.y - top, c.spanX, c.spanY, blockOccupied, true);
1945 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
2051 private boolean rearrangementExists(int cellX, int cellY, int spanX, int spanY, int[] direction,
2057 mOccupiedRect.set(cellX, cellY, cellX + spanX, cellY + spanY);
2067 Rect r0 = new Rect(cellX, cellY, cellX + spanX, cellY + spanY);
2073 r1.set(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
2131 int spanY, int[] direction, View dragView, boolean decX, ItemConfiguration solution) {
2141 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2146 success = rearrangementExists(result[0], result[1], spanX, spanY, direction, dragView,
2152 if (spanX > minSpanX && (minSpanY == spanY || decX)) {
2153 return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX - 1, spanY, direction,
2155 } else if (spanY > minSpanY) {
2156 return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY - 1, direction,
2165 solution.dragViewSpanY = spanY;
2202 lp.cellVSpan = c.spanY;
2203 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
2228 markCellsForView(c.x, c.y, c.spanX, c.spanY, occupied, true);
2247 c.x, c.y, c.spanX, c.spanY);
2267 int spanX, int spanY) {
2268 regionToCenterPoint(cellX0, cellY0, spanX, spanY, mTmpPoint);
2271 regionToCenterPoint(cellX1, cellY1, spanX, spanY, mTmpPoint);
2390 info.spanX != lp.cellHSpan || info.spanY != lp.cellVSpan) {
2396 info.spanY = lp.cellVSpan;
2411 int spanX, int spanY, View dragView, ItemConfiguration solution) {
2414 findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null, result,
2442 int spanY, View dragView, int[] resultDirection) {
2445 findNearestArea(dragViewCenterX, dragViewCenterY, spanX, spanY, targetDestination);
2447 regionToRect(targetDestination[0], targetDestination[1], spanX, spanY, dragRect);
2451 getViewsIntersectingRegion(targetDestination[0], targetDestination[1], spanX, spanY,
2461 int deltaY = (dropRegionRect.centerY() - dragViewCenterY) / spanY;
2466 if (dropRegionSpanY == mCountY || spanY == mCountY) {
2480 private void getViewsIntersectingRegion(int cellX, int cellY, int spanX, int spanY,
2483 boundingRect.set(cellX, cellY, cellX + spanX, cellY + spanY);
2486 Rect r0 = new Rect(cellX, cellY, cellX + spanX, cellY + spanY);
2503 boolean isNearestDropLocationOccupied(int pixelX, int pixelY, int spanX, int spanY,
2505 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2506 getViewsIntersectingRegion(result[0], result[1], spanX, spanY, dragView, null,
2528 boolean createAreaForResize(int cellX, int cellY, int spanX, int spanY,
2531 regionToCenterPoint(cellX, cellY, spanX, spanY, pixelXY);
2534 ItemConfiguration swapSolution = simpleSwap(pixelXY[0], pixelXY[1], spanX, spanY,
2535 spanX, spanY, direction, dragView, true, new ItemConfiguration());
2559 int[] createArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
2562 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2581 getDirectionVectorForDrop(pixelX, pixelY, spanX, spanY, dragView, mDirectionVector);
2587 spanX, spanY, mDirectionVector, dragView, true, new ItemConfiguration());
2591 minSpanY, spanX, spanY, dragView, new ItemConfiguration());
2685 int spanX, spanY;
2694 copy.spanY = spanY;
2697 public CellAndSpan(int x, int y, int spanX, int spanY) {
2701 this.spanY = spanY;
2705 return "(" + x + ", " + y + ": " + spanX + ", " + spanY + ")";
2717 * @param spanY Vertical span of the object.
2724 int pixelX, int pixelY, int spanX, int spanY, View ignoreView, int[] result) {
2725 return findNearestArea(pixelX, pixelY, spanX, spanY, ignoreView, true, result);
2737 * @param spanY Vertical span of the object.
2744 int spanX, int spanY, View ignoreView, int[] result, int[] resultSpan) {
2745 return findNearestArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, ignoreView, true,
2756 * @param spanY Vertical span of the object.
2763 int pixelX, int pixelY, int spanX, int spanY, int[] result) {
2764 return findNearestArea(pixelX, pixelY, spanX, spanY, null, false, result);
2780 * @param spanY The vertical span of the cell we want to find.
2784 boolean findCellForSpan(int[] cellXY, int spanX, int spanY) {
2785 return findCellForSpanThatIntersectsIgnoring(cellXY, spanX, spanY, -1, -1, null, mOccupied);
2794 * @param spanY The vertical span of the cell we want to find.
2798 boolean findCellForSpanIgnoring(int[] cellXY, int spanX, int spanY, View ignoreView) {
2799 return findCellForSpanThatIntersectsIgnoring(cellXY, spanX, spanY, -1, -1,
2808 * @param spanY The vertical span of the cell we want to find.
2815 boolean findCellForSpanThatIntersects(int[] cellXY, int spanX, int spanY,
2818 cellXY, spanX, spanY, intersectX, intersectY, null, mOccupied);
2824 boolean findCellForSpanThatIntersectsIgnoring(int[] cellXY, int spanX, int spanY,
2841 startY = Math.max(startY, intersectY - (spanY - 1));
2843 int endY = mCountY - (spanY - 1);
2845 endY = Math.min(endY, intersectY + (spanY - 1) + (spanY == 1 ? 1 : 0));
2852 for (int j = 0; j < spanY; j++) {
2981 int spanY = (int) Math.ceil(height / (float) smallerSize);
2984 return new int[] { spanX, spanY };
2987 result[1] = spanY;
3013 info.spanX = info.spanY = 1;
3018 info.spanY = spans[1];
3026 * @param spanY Vertical cell span.
3030 public boolean getVacantCell(int[] vacant, int spanX, int spanY) {
3032 return findVacantCell(vacant, spanX, spanY, mCountX, mCountY, mOccupied);
3035 static boolean findVacantCell(int[] vacant, int spanX, int spanY,
3042 for (int j = y; j < y + spanY - 1 && y < yCount; j++) {
3090 private void markCellsForView(int cellX, int cellY, int spanX, int spanY, boolean[][] occupied,
3094 for (int y = cellY; y < cellY + spanY && y < mCountY; y++) {
3298 // its spanX, spanY, and the screen it is on
3307 int spanY;