Home | History | Annotate | Download | only in launcher3

Lines Matching refs:spanX

727                     cellInfo.spanX = lp.cellHSpan;
744 cellInfo.spanX = 1;
777 cellInfo.spanX = 0;
854 void regionToCenterPoint(int cellX, int cellY, int spanX, int spanY, int[] result) {
858 (spanX * mCellWidth + (spanX - 1) * mWidthGap) / 2;
870 void regionToRect(int cellX, int cellY, int spanX, int spanY, Rect result) {
875 result.set(left, top, left + (spanX * mCellWidth + (spanX - 1) * mWidthGap),
1163 * @param spanX The number of horizontal cells that the item spans
1167 void estimateDropCell(int originX, int originY, int spanX, int spanY, int[] result) {
1176 int rightOverhang = result[0] + spanX - countX;
1189 int cellY, int spanX, int spanY, boolean resize, Point dragOffset, Rect dragRegion) {
1219 left += ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap)
1225 left += dragOffset.x + ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap)
1232 left += ((mCellWidth * spanX) + ((spanX - 1) * mWidthGap)
1244 cellToRect(cellX, cellY, spanX, spanY, r);
1264 * @param spanX Horizontal span of the object.
1271 int[] findNearestVacantArea(int pixelX, int pixelY, int spanX, int spanY,
1273 return findNearestVacantArea(pixelX, pixelY, spanX, spanY, null, result);
1284 * @param spanX Horizontal span of the object.
1291 int[] findNearestVacantArea(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX,
1293 return findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null,
1303 * @param spanX Horizontal 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);
1340 * @param spanX Horizontal 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
1358 pixelX -= (mCellWidth + mWidthGap) * (spanX - 1) / 2f;
1370 if (minSpanX <= 0 || minSpanY <= 0 || spanX <= 0 || spanY <= 0 ||
1371 spanX < minSpanX || spanY < minSpanY) {
1396 boolean hitMaxX = xSize >= spanX;
1420 hitMaxX |= xSize >= spanX;
1425 hitMaxX = xSize >= spanX;
1480 * @param spanX Horizontal 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,
1505 for (int x = 0; x < countX - (spanX - 1); x++) {
1507 for (int i = 0; i < spanX; i++) {
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);
1622 int right = cs.x + cs.spanX;
1631 spanX; j++) {
1639 for (int j = cs.x; j < cs.x + cs.spanX; j++) {
1657 if (edge[i] == cs.x + cs.spanX) {
1670 for (int i = cs.x; i < cs.x + cs.spanX; i++) {
1677 for (int i = cs.x; i < cs.x + cs.spanX; i++) {
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);
1780 return (r.x + r.spanX) - (l.x + l.spanX);
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);
2130 ItemConfiguration simpleSwap(int pixelX, int pixelY, int minSpanX, int minSpanY, int spanX,
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,
2156 return simpleSwap(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY - 1, direction,
2164 solution.dragViewSpanX = spanX;
2201 lp.cellHSpan = c.spanX;
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) {
2395 info.spanX = lp.cellHSpan;
2411 int spanX, int spanY, View dragView, ItemConfiguration solution) {
2414 findNearestVacantArea(pixelX, pixelY, minSpanX, minSpanY, spanX, spanY, null, result,
2441 private void getDirectionVectorForDrop(int dragViewCenterX, int dragViewCenterY, int spanX,
2445 findNearestArea(dragViewCenterX, dragViewCenterY, spanX, spanY, targetDestination);
2447 spanX, spanY, dragRect);
2451 getViewsIntersectingRegion(targetDestination[0], targetDestination[1], spanX, spanY,
2460 int deltaX = (dropRegionRect.centerX() - dragViewCenterX) / spanX;
2463 if (dropRegionSpanX == mCountX || spanX == mCountX) {
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;
2693 copy.spanX = spanX;
2697 public CellAndSpan(int x, int y, int spanX, int spanY) {
2700 this.spanX = spanX;
2705 return "(" + x + ", " + y + ": " + spanX + ", " + spanY + ")";
2716 * @param spanX Horizontal 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);
2736 * @param spanX Horizontal 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,
2755 * @param spanX Horizontal 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);
2779 * @param spanX The horizontal 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);
2793 * @param spanX The horizontal 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,
2807 * @param spanX The horizontal 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
2833 startX = Math.max(startX, intersectX - (spanX - 1));
2835 int endX = mCountX - (spanX - 1);
2837 endX = Math.min(endX, intersectX + (spanX - 1) + (spanX == 1 ? 1 : 0));
2851 for (int i = 0; i < spanX; i++) {
2980 int spanX = (int) Math.ceil(width / (float) smallerSize);
2984 return new int[] { spanX, spanY };
2986 result[0] = spanX;
3013 info.spanX = info.spanY = 1;
3017 info.spanX = spans[0];
3025 * @param spanX Horizontal 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,
3041 out: for (int i = x; i < x + spanX - 1 && x < xCount; i++) {
3090 private void markCellsForView(int cellX, int cellY, int spanX, int spanY, boolean[][] occupied,
3093 for (int x = cellX; x < cellX + spanX && x < mCountX; x++) {
3298 // its spanX
3306 int spanX;