Lines Matching refs:spanX

741                     cellInfo.spanX = lp.cellHSpan;
758 cellInfo.spanX = 1;
791 cellInfo.spanX = 0;
868 void regionToCenterPoint(int cellX, int cellY, int spanX, int spanY, int[] result) {
872 (spanX * mCellWidth + (spanX - 1) * mWidthGap) / 2;
884 void regionToRect(int cellX, int cellY, int spanX, int spanY, Rect result) {
889 result.set(left, top, left + (spanX * mCellWidth + (spanX - 1) * mWidthGap),
1184 * @param spanX The number of horizontal cells that the item spans
1188 void estimateDropCell(int originX, int originY, int spanX, int spanY, int[] result) {
1197 int rightOverhang = result[0] + spanX - countX;
1210 int cellY, int spanX, int spanY, boolean resize, Point dragOffset, Rect dragRegion) {
1246 left += ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap)
1252 left += dragOffset.x + ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap)
1257 left += ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap)
1269 cellToRect(cellX, cellY, spanX, spanY, r);
1289 * @param spanX Horizontal span of the object.
1296 int[] findNearestVacantArea(int pixelX, int pixelY, int spanX, int spanY,
1298 return findNearestVacantArea(pixelX, pixelY, spanX, spanY, null, result);
1309 * @param spanX Horizontal span of the object.
1316 int[] findNearestVacantArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX,
1318 return findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null,
1328 * @param spanX Horizontal 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);
1365 * @param spanX Horizontal 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
1383 pixelX -= (mCellWidth + mWidthGap) * (spanX - 1) / 2f;
1395 if (minSpanX <= 0 || minSpanY <= 0 || spanX <= 0 || spanY <= 0 ||
1396 spanX < minSpanX || spanY < minSpanY) {
1421 boolean hitMaxX = xSize >= spanX;
1445 hitMaxX |= xSize >= spanX;
1450 hitMaxX = xSize >= spanX;
1505 * @param spanX Horizontal 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,
1530 for (int x = 0; x < countX - (spanX - 1); x++) {
1532 for (int i = 0; i < spanX; i++) {
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);
1647 int right = cs.x + cs.spanX;
1656 for (int j = cs.x; j < cs.x + cs.spanX; j++) {
1664 for (int j = cs.x; j < cs.x + cs.spanX; j++) {
1682 if (edge[i] == cs.x + cs.spanX) {
1695 for (int i = cs.x; i < cs.x + cs.spanX; i++) {
1702 for (int i = cs.x; i < cs.x + cs.spanX; i++) {
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);
1805 return (r.x + r.spanX) - (l.x + l.spanX);
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);
2155 ItemConfiguration simpleSwap(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX,
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,
2181 return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY - 1, direction,
2189 solution.dragViewSpanX = spanX;
2226 lp.cellHSpan = c.spanX;
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) {
2420 info.spanX = lp.cellHSpan;
2436 int spanX, int spanY, View dragView, ItemConfiguration solution) {
2439 findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null, result,
2466 private void getDirectionVectorForDrop(int dragViewCenterX, int dragViewCenterY, int spanX,
2470 findNearestArea(dragViewCenterX, dragViewCenterY, spanX, spanY, targetDestination);
2472 regionToRect(targetDestination[0], targetDestination[1], spanX, spanY, dragRect);
2476 getViewsIntersectingRegion(targetDestination[0], targetDestination[1], spanX, spanY,
2485 int deltaX = (dropRegionRect.centerX() - dragViewCenterX) / spanX;
2488 if (dropRegionSpanX == mCountX || spanX == mCountX) {
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;
2718 copy.spanX = spanX;
2722 public CellAndSpan(int x, int y, int spanX, int spanY) {
2725 this.spanX = spanX;
2730 return "(" + x + ", " + y + ": " + spanX + ", " + spanY + ")";
2741 * @param spanX Horizontal 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);
2761 * @param spanX Horizontal 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,
2780 * @param spanX Horizontal 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);
2804 * @param spanX The horizontal 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);
2818 * @param spanX The horizontal 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,
2832 * @param spanX The horizontal 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,
2858 startX = Math.max(startX, intersectX - (spanX - 1));
2860 int endX = mCountX - (spanX - 1);
2862 endX = Math.min(endX, intersectX + (spanX - 1) + (spanX == 1 ? 1 : 0));
2876 for (int i = 0; i < spanX; i++) {
3002 int spanX = (int) Math.ceil(width / (float) smallerSize);
3006 return new int[] { spanX, spanY };
3008 result[0] = spanX;
3035 info.spanX = info.spanY = 1;
3039 info.spanX = spans[0];
3047 * @param spanX Horizontal 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,
3063 out: for (int i = x; i < x + spanX - 1 && x < xCount; i++) {
3112 private void markCellsForView(int cellX, int cellY, int spanX, int spanY, boolean[][] occupied,
3115 for (int x = cellX; x < cellX + spanX && x < mCountX; x++) {
3315 // its spanX, spanY, and the screen it is on
3323 int spanX;