Lines Matching defs:spanY

741                     cellInfo.spanY = lp.cellVSpan;
758 cellInfo.spanY = 1;
791 cellInfo.spanY = 0;
867 void regionToCenterPoint(int cellX, int cellY, int spanX, int spanY, int[] result) {
873 (spanY * mCellHeight + (spanY - 1) * mHeightGap) / 2;
883 void regionToRect(int cellX, int cellY, int spanX, int spanY, Rect result) {
889 top + (spanY * mCellHeight + (spanY - 1) * mHeightGap));
1177 * @param spanY The number of vertical cells that the item spans
1180 void estimateDropCell(int originX, int originY, int spanX, int spanY, int[] result) {
1194 int bottomOverhang = result[1] + spanY - countY;
1202 int cellY, int spanX, int spanY, boolean resize, Point dragOffset, Rect dragRegion) {
1247 top += ((mCellHeight * spanY) + ((spanY - 1) * mHeightGap)
1257 cellToRect(cellX, cellY, spanX, spanY, r);
1278 * @param spanY Vertical span of the object.
1284 int[] findNearestVacantArea(int pixelX, int pixelY, int spanX, int spanY,
1286 return findNearestVacantArea(pixelX, pixelY, spanX, spanY, null, result);
1298 * @param spanY Vertical span of the object.
1305 int spanY, int[] result, int[] resultSpan) {
1306 return findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null,
1317 * @param spanY Vertical span of the object.
1324 int[] findNearestArea(int pixelX, int pixelY, int spanX, int spanY, View ignoreView,
1326 return findNearestArea(pixelX, pixelY, spanX, spanY,
1327 spanX, spanY, ignoreView, ignoreOccupied, result, null, mOccupied);
1354 * @param spanY Vertical span of the object.
1361 int[] findNearestArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
1368 // For items with a spanX / spanY > 1, the passed in point (pixelX, pixelY) corresponds
1372 pixelY -= (mCellHeight + mHeightGap) * (spanY - 1) / 2f;
1383 if (minSpanX <= 0 || minSpanY <= 0 || spanX <= 0 || spanY <= 0 ||
1384 spanX < minSpanX || spanY < minSpanY) {
1410 boolean hitMaxY = ySize >= spanY;
1434 hitMaxY |= ySize >= spanY;
1439 hitMaxY = ySize >= spanY;
1494 * @param spanY Vertical span of the object.
1500 * cellY, spanX, spanY) are occupied. This is used when try to move a group of views.
1506 private int[] findNearestArea(int cellX, int cellY, int spanX, int spanY, int[] direction,
1516 for (int y = 0; y < countY - (spanY - 1); y++) {
1521 for (int j = 0; j < spanY; j++) {
1562 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1565 findNearestArea(c.x, c.y, c.spanX, c.spanY, direction, mTmpOccupied, null, mTempLocation);
1572 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
1628 for (int j = cs.y; j < cs.y + cs.spanY; j++) {
1636 for (int j = cs.y; j < cs.y + cs.spanY; j++) {
1651 int bottom = cs.y + cs.spanY;
1669 for (int i = cs.y; i < cs.y + cs.spanY; i++) {
1676 for (int i = cs.y; i < cs.y + cs.spanY; i++) {
1684 if (edge[i] == cs.y + cs.spanY) {
1733 boundingRect.set(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1736 boundingRect.union(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1797 return (r.y + r.spanY) - (l.y + l.spanY);
1844 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1874 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1900 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
1916 boundingRect = new Rect(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1918 boundingRect.union(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
1925 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, false);
1935 markCellsForView(c.x - left, c.y - top, c.spanX, c.spanY, blockOccupied, true);
1958 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
2064 private boolean rearrangementExists(int cellX, int cellY, int spanX, int spanY, int[] direction,
2070 mOccupiedRect.set(cellX, cellY, cellX + spanX, cellY + spanY);
2080 Rect r0 = new Rect(cellX, cellY, cellX + spanX, cellY + spanY);
2086 r1.set(c.x, c.y, c.x + c.spanX, c.y + c.spanY);
2146 int spanX, int spanY, int[] direction, View dragView, boolean decX,
2157 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2162 success = rearrangementExists(result[0], result[1], spanX, spanY, direction, dragView,
2168 if (spanX > minSpanX && (minSpanY == spanY || decX)) {
2169 return findReorderSolution(pixelX, pixelY, minSpanX, minSpanY, spanX - 1, spanY,
2171 } else if (spanY > minSpanY) {
2172 return findReorderSolution(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY - 1,
2181 solution.dragViewSpanY = spanY;
2218 lp.cellVSpan = c.spanY;
2219 markCellsForView(c.x, c.y, c.spanX, c.spanY, mTmpOccupied, true);
2244 markCellsForView(c.x, c.y, c.spanX, c.spanY, occupied, true);
2268 lp.cellY, c.x, c.y, c.spanX, c.spanY);
2295 int cellY1, int spanX, int spanY) {
2296 regionToCenterPoint(cellX0, cellY0, spanX, spanY, mTmpPoint);
2299 regionToCenterPoint(cellX1, cellY1, spanX, spanY, mTmpPoint);
2422 info.spanX != lp.cellHSpan || info.spanY != lp.cellVSpan) {
2428 info.spanY = lp.cellVSpan;
2443 int spanX, int spanY, View dragView, ItemConfiguration solution) {
2446 findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null, result,
2474 int spanY, View dragView, int[] resultDirection) {
2477 findNearestArea(dragViewCenterX, dragViewCenterY, spanX, spanY, targetDestination);
2479 regionToRect(targetDestination[0], targetDestination[1], spanX, spanY, dragRect);
2483 getViewsIntersectingRegion(targetDestination[0], targetDestination[1], spanX, spanY,
2493 int deltaY = (dropRegionRect.centerY() - dragViewCenterY) / spanY;
2498 if (dropRegionSpanY == mCountY || spanY == mCountY) {
2512 private void getViewsIntersectingRegion(int cellX, int cellY, int spanX, int spanY,
2515 boundingRect.set(cellX, cellY, cellX + spanX, cellY + spanY);
2518 Rect r0 = new Rect(cellX, cellY, cellX + spanX, cellY + spanY);
2535 boolean isNearestDropLocationOccupied(int pixelX, int pixelY, int spanX, int spanY,
2537 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2538 getViewsIntersectingRegion(result[0], result[1], spanX, spanY, dragView, null,
2561 boolean createAreaForResize(int cellX, int cellY, int spanX, int spanY,
2564 regionToCenterPoint(cellX, cellY, spanX, spanY, pixelXY);
2567 ItemConfiguration swapSolution = findReorderSolution(pixelXY[0], pixelXY[1], spanX, spanY,
2568 spanX, spanY, direction, dragView, true, new ItemConfiguration());
2592 int[] performReorder(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX, int spanY,
2595 result = findNearestArea(pixelX, pixelY, spanX, spanY, result);
2614 getDirectionVectorForDrop(pixelX, pixelY, spanX, spanY, dragView, mDirectionVector);
2621 spanX, spanY, mDirectionVector, dragView, true, new ItemConfiguration());
2625 minSpanY, spanX, spanY, dragView, new ItemConfiguration());
2737 int spanX, spanY;
2746 copy.spanY = spanY;
2749 public CellAndSpan(int x, int y, int spanX, int spanY) {
2753 this.spanY = spanY;
2757 return "(" + x + ", " + y + ": " + spanX + ", " + spanY + ")";
2769 * @param spanY Vertical span of the object.
2776 int pixelX, int pixelY, int spanX, int spanY, View ignoreView, int[] result) {
2777 return findNearestArea(pixelX, pixelY, spanX, spanY, ignoreView, true, result);
2789 * @param spanY Vertical span of the object.
2796 int spanX, int spanY, View ignoreView, int[] result, int[] resultSpan) {
2797 return findNearestArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, ignoreView, true,
2808 * @param spanY Vertical span of the object.
2815 int pixelX, int pixelY, int spanX, int spanY, int[] result) {
2816 return findNearestArea(pixelX, pixelY, spanX, spanY, null, false, result);
2832 * @param spanY The vertical span of the cell we want to find.
2836 boolean findCellForSpan(int[] cellXY, int spanX, int spanY) {
2837 return findCellForSpanThatIntersectsIgnoring(cellXY, spanX, spanY, -1, -1, null, mOccupied);
2846 * @param spanY The vertical span of the cell we want to find.
2850 boolean findCellForSpanIgnoring(int[] cellXY, int spanX, int spanY, View ignoreView) {
2851 return findCellForSpanThatIntersectsIgnoring(cellXY, spanX, spanY, -1, -1,
2860 * @param spanY The vertical span of the cell we want to find.
2867 boolean findCellForSpanThatIntersects(int[] cellXY, int spanX, int spanY,
2870 cellXY, spanX, spanY, intersectX, intersectY, null, mOccupied);
2876 boolean findCellForSpanThatIntersectsIgnoring(int[] cellXY, int spanX, int spanY,
2893 startY = Math.max(startY, intersectY - (spanY - 1));
2895 int endY = mCountY - (spanY - 1);
2897 endY = Math.min(endY, intersectY + (spanY - 1) + (spanY == 1 ? 1 : 0));
2904 for (int j = 0; j < spanY; j++) {
3033 int spanY = (int) Math.ceil(height / (float) smallerSize);
3036 return new int[] { spanX, spanY };
3039 result[1] = spanY;
3065 info.spanX = info.spanY = 1;
3070 info.spanY = spans[1];
3078 * @param spanY Vertical cell span.
3082 public boolean getVacantCell(int[] vacant, int spanX, int spanY) {
3084 return findVacantCell(vacant, spanX, spanY, mCountX, mCountY, mOccupied);
3087 static boolean findVacantCell(int[] vacant, int spanX, int spanY,
3094 for (int j = y; j < y + spanY - 1 && y < yCount; j++) {
3142 private void markCellsForView(int cellX, int cellY, int spanX, int spanY, boolean[][] occupied,
3146 for (int y = cellY; y < cellY + spanY && y < mCountY; y++) {
3350 // its spanX, spanY, and the screen it is on
3359 int spanY;