Home | History | Annotate | Download | only in launcher2

Lines Matching refs:CellLayout

111     private CellLayout.CellInfo mDragInfo;
124 * The CellLayout that is currently being dragged over
126 private CellLayout mDragTargetLayout = null;
128 * The CellLayout that we will show as glowing
130 private CellLayout mDragOverlappingLayout = null;
133 * The CellLayout which will be dropped to
135 private CellLayout mDropToLayout = null;
315 while (CellLayout.widthInPortrait(res, cellCountX + 1) <= minDims.x) {
320 while (actionBarHeight + CellLayout.heightInLandscape(res, cellCountY + 1)
360 CellLayout cl = (CellLayout) mLauncher.getWorkspace().getChildAt(0);
375 public Rect estimateItemPosition(CellLayout cl, ItemInfo pendingInfo,
440 if (!(child instanceof CellLayout)) {
441 throw new IllegalArgumentException("A Workspace can only have CellLayout children.");
443 CellLayout cl = ((CellLayout) child);
455 final CellLayout cl = (CellLayout) child;
519 final CellLayout layout;
543 layout = (CellLayout) getChildAt(screen);
548 CellLayout.LayoutParams lp;
549 if (genericLp == null || !(genericLp instanceof CellLayout.LayoutParams)) {
550 lp = new CellLayout.LayoutParams(x, y, spanX, spanY);
552 lp = (CellLayout.LayoutParams) genericLp;
570 Log.w(TAG, "Failed to add to item at (" + lp.cellX + "," + lp.cellY + ") to CellLayout");
619 * Called directly from a CellLayout (not by the framework), after we've been added as a
620 * listener via setOnInterceptTouchEventListener(). This allows us to tell the CellLayout
661 final CellLayout currentPage = (CellLayout) getChildAt(mCurrentPage);
673 CellLayout cl = (CellLayout) getChildAt(i);
754 ((CellLayout) getPageAt(i)).setShortcutAndWidgetAlpha(1f);
1119 CellLayout cl = (CellLayout) getChildAt(i);
1194 CellLayout child = (CellLayout) getChildAt(i);
1212 CellLayout child = (CellLayout) getChildAt(i);
1240 CellLayout cl = (CellLayout) getChildAt(index);
1260 ((CellLayout) getChildAt(0)).resetOverscrollTransforms();
1261 ((CellLayout) getChildAt(getChildCount() - 1)).resetOverscrollTransforms();
1364 final CellLayout layout = (CellLayout) getChildAt(i);
1373 final CellLayout layout = (CellLayout) getChildAt(i);
1393 final CellLayout cl = (CellLayout) getChildAt(i);
1415 final CellLayout layout = (CellLayout) getPageAt(i);
1421 final CellLayout layout = (CellLayout) getPageAt(i);
1435 CellLayout cl = (CellLayout) getChildAt(i);
1614 final CellLayout cl = (CellLayout) getChildAt(i);
1661 final CellLayout cl = (CellLayout) getChildAt(i);
1748 final CellLayout cl = (CellLayout) getChildAt(i);
1874 void startDrag(CellLayout.CellInfo cellInfo) {
1884 CellLayout layout = (CellLayout) child.getParent().getParent();
1947 void addApplicationShortcut(ShortcutInfo info, CellLayout target, long container, int screen,
1967 CellLayout dropTargetLayout = mDropToLayout;
1988 final CellLayout.CellInfo dragCellInfo = mDragInfo;
2021 null, mTargetCell, resultSpan, CellLayout.MODE_ACCEPT_DROP);
2044 boolean willCreateUserFolder(ItemInfo info, CellLayout target, int[] targetCell, float
2050 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
2073 boolean willAddToExistingUserFolder(Object dragInfo, CellLayout target, int[] targetCell,
2079 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
2094 boolean createUserFolderIfNecessary(View newView, long container, CellLayout target,
2102 CellLayout cellParent = getParentCellLayoutForView(mDragInfo.cell);
2147 boolean addToExistingFolderIfNecessary(View newView, CellLayout target, int[] targetCell,
2174 CellLayout dropTargetLayout = mDropToLayout;
2239 mTargetCell, resultSpan, CellLayout.MODE_ON_DROP);
2269 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams();
2280 final CellLayout cellLayout = dropTargetLayout;
2291 dragLayer.addResizeFrame(info, hostView, cellLayout);
2310 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams();
2313 CellLayout layout = (CellLayout) cell.getParent().getParent();
2318 final CellLayout parent = (CellLayout) cell.getParent().getParent();
2356 CellLayout cl = (CellLayout) getChildAt(screen);
2368 CellLayout cl = (CellLayout) getChildAt(screen);
2394 CellLayout layout = getCurrentDropLayout();
2411 if (orientation == CellLayout.LANDSCAPE) {
2420 CellLayout.getMetrics(mLandscapeCellLayoutMetrics, res,
2425 } else if (orientation == CellLayout.PORTRAIT) {
2434 CellLayout.getMetrics(mPortraitCellLayoutMetrics, res,
2452 mDropToLayout = (CellLayout) getPageAt(getNextPage());
2478 void setCurrentDropLayout(CellLayout layout) {
2492 void setCurrentDragOverlappingLayout(CellLayout layout) {
2562 * Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's
2572 * Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's
2604 * Convert the 2D coordinate xy from this CellLayout's coordinate space to
2626 * Returns true if the passed CellLayout cl overlaps with dragView
2629 boolean overlaps(CellLayout cl, DragView dragView,
2631 // Transform the coordinates of the item being dragged to the CellLayout's coordinates
2640 // to the CellLayout's local coordinates
2647 // to the CellLayout's local coordinates
2665 * This method returns the CellLayout that is currently being dragged to. In order to drag
2666 * to a CellLayout, either the touch point must be directly over the CellLayout, or as a second
2667 * strategy, we see if the dragView is overlapping any CellLayout and choose the closest one
2669 * Return null if no CellLayout is currently being dragged over
2672 private CellLayout findMatchingPageForDragOver(
2677 CellLayout bestMatchingScreen = null;
2681 CellLayout cl = (CellLayout) getChildAt(i);
2684 // Transform the touch coordinates to the CellLayout's local coordinates
2704 // Calculate the distance between the center of the CellLayout
2762 CellLayout layout = null;
2876 private void manageFolderFeedback(ItemInfo info, CellLayout targetLayout,
2913 CellLayout layout;
2917 public FolderCreationAlarmListener(CellLayout layout, int cellX, int cellY) {
2962 child, mTargetCell, resultSpan, CellLayout.MODE_DRAG_OVER);
2989 public boolean addExternalItemToScreen(ItemInfo dragInfo, CellLayout layout) {
2991 onDropExternal(dragInfo.dropPos, (ItemInfo) dragInfo, (CellLayout) layout, false);
2999 CellLayout cellLayout, boolean insertAtFirst) {
3000 onDropExternal(touchXY, dragInfo, cellLayout, insertAtFirst, null);
3012 final CellLayout cellLayout, boolean insertAtFirst, DragObject d) {
3028 final long container = mLauncher.isHotseatLayout(cellLayout) ?
3031 final int screen = indexOfChild(cellLayout);
3032 if (!mLauncher.isHotseatLayout(cellLayout) && screen != mCurrentPage
3043 cellLayout, mTargetCell);
3044 float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],
3046 if (willCreateUserFolder((ItemInfo) d.dragInfo, cellLayout, mTargetCell,
3048 cellLayout, mTargetCell, distance)) {
3063 mTargetCell = cellLayout.createArea((int) mDragViewVisualCenter[0],
3065 null, mTargetCell, resultSpan, CellLayout.MODE_ON_DROP_EXTERNAL);
3111 animateWidgetDrop(info, cellLayout, d.dragView, onAnimationCompleteRunnable,
3124 view = mLauncher.createShortcut(R.layout.application, cellLayout,
3128 view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout,
3139 cellLayout, mTargetCell);
3140 float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],
3143 if (createUserFolderIfNecessary(view, container, cellLayout, mTargetCell, distance,
3147 if (addToExistingFolderIfNecessary(view, cellLayout, mTargetCell, distance, d,
3155 mTargetCell = cellLayout.createArea((int) mDragViewVisualCenter[0],
3157 null, mTargetCell, null, CellLayout.MODE_ON_DROP_EXTERNAL);
3159 cellLayout.findCellForSpan(mTargetCell, 1, 1);
3163 cellLayout.onDropChild(view);
3164 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) view.getLayoutParams();
3165 cellLayout.getShortcutsAndWidgets().measureChild(view);
3173 // cellLayout to its final transform -- this means we animate the drag view to
3175 setFinalTransitionTransform(cellLayout);
3178 resetTransitionTransform(cellLayout);
3204 DragView dragView, CellLayout layout, ItemInfo info, int[] targetCell,
3239 public void animateWidgetDrop(ItemInfo info, CellLayout cellLayout, DragView dragView,
3248 getFinalPositionForDropAnimation(finalPos, scaleXY, dragView, cellLayout, info, mTargetCell,
3296 public void setFinalTransitionTransform(CellLayout layout) {
3311 public void resetTransitionTransform(CellLayout layout) {
3327 * Return the current {@link CellLayout}, correctly picking the destination
3330 public CellLayout getCurrentDropLayout() {
3331 return (CellLayout) getChildAt(getNextPage());
3340 public CellLayout.CellInfo getDragInfo() {
3350 int spanX, int spanY, CellLayout layout, int[] recycle) {
3380 CellLayout cellLayout;
3382 cellLayout = mLauncher.getHotseat().getLayout();
3384 cellLayout = (CellLayout) getChildAt(mDragInfo.screen);
3386 cellLayout.onDropChild(mDragInfo.cell);
3398 void updateItemLocationsInDatabase(CellLayout cl) {
3457 CellLayout cl = (CellLayout) getChildAt(child);
3517 CellLayout layout = (CellLayout) getChildAt(page);
3534 CellLayout layout = getCurrentDropLayout();
3550 * Returns a specific CellLayout
3552 CellLayout getParentCellLayoutForView(View v) {
3553 ArrayList<CellLayout> layouts = getWorkspaceAndHotseatCellLayouts();
3554 for (CellLayout layout : layouts) {
3565 ArrayList<CellLayout> getWorkspaceAndHotseatCellLayouts() {
3566 ArrayList<CellLayout> layouts = new ArrayList<CellLayout>();
3569 layouts.add(((CellLayout) getChildAt(screen)));
3587 childrenLayouts.add(((CellLayout) getChildAt(screen)).getShortcutsAndWidgets());
3651 ArrayList<CellLayout> cellLayouts = getWorkspaceAndHotseatCellLayouts();
3652 for (CellLayout layoutParent : cellLayouts) {
3706 ArrayList<CellLayout> cellLayouts = getWorkspaceAndHotseatCellLayouts();
3707 for (final CellLayout layoutParent: cellLayouts) {