Home | History | Annotate | Download | only in launcher3

Lines Matching defs:cellLayout

120     @Thunk LongArrayMap<CellLayout> mWorkspaceScreens = new LongArrayMap<>();
130 private CellLayout.CellInfo mDragInfo;
148 * The CellLayout that is currently being dragged over
150 @Thunk CellLayout mDragTargetLayout = null;
152 * The CellLayout that we will show as glowing
154 private CellLayout mDragOverlappingLayout = null;
157 * The CellLayout which will be dropped to
159 private CellLayout mDropToLayout = null;
327 CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
342 CellLayout cl = (CellLayout) getChildAt(numCustomPages());
358 public Rect estimateItemPosition(CellLayout cl, ItemInfo pendingInfo,
460 if (!(child instanceof CellLayout)) {
461 throw new IllegalArgumentException("A Workspace can only have CellLayout children.");
463 CellLayout cl = ((CellLayout) child);
471 final CellLayout cl = (CellLayout) child;
540 // created CellLayout.
541 CellLayout newScreen = (CellLayout) mLauncher.getLayoutInflater().inflate(
554 newScreen.enableAccessibleDrag(true, CellLayout.WORKSPACE_ACCESSIBILITY_DRAG);
560 CellLayout customScreen = (CellLayout)
584 CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
618 CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
621 CellLayout.LayoutParams lp = new CellLayout.LayoutParams(0, 0, spanX, spanY);
651 CellLayout cl = (CellLayout) mDragSourceInternal.getParent();
685 CellLayout finalScreen = mWorkspaceScreens.get(finalScreenId);
754 final CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
801 CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
820 public CellLayout getScreenWithId(long screenId) {
821 CellLayout layout = mWorkspaceScreens.get(screenId);
825 public long getIdForScreen(CellLayout layout) {
866 CellLayout
878 CellLayout cl = mWorkspaceScreens.get(id);
954 final CellLayout layout;
980 CellLayout.LayoutParams lp;
981 if (genericLp == null || !(genericLp instanceof CellLayout.LayoutParams)) {
982 lp = new CellLayout.LayoutParams(x, y, spanX, spanY);
984 lp = (CellLayout.LayoutParams) genericLp;
1004 Launcher.addDumpLog(TAG, "Failed to add to item at (" + lp.cellX + "," + lp.cellY + ") to CellLayout", true);
1017 * Called directly from a CellLayout (not by the framework), after we've been added as a
1018 * listener via setOnInterceptTouchEventListener(). This allows us to tell the CellLayout
1062 final CellLayout currentPage = (CellLayout) getChildAt(mCurrentPage);
1085 CellLayout cl = (CellLayout) getChildAt(i);
1544 CellLayout child = (CellLayout) getChildAt(i);
1558 CellLayout child = (CellLayout) getChildAt(i);
1559 child.enableAccessibleDrag(enable, CellLayout.WORKSPACE_ACCESSIBILITY_DRAG);
1571 .enableAccessibleDrag(enable, CellLayout.WORKSPACE_ACCESSIBILITY_DRAG);
1608 CellLayout cc = mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID);
1757 final CellLayout layout = (CellLayout) getChildAt(i);
1766 final CellLayout layout = (CellLayout) getChildAt(i);
1785 final CellLayout cl = (CellLayout) getChildAt(i);
1807 final CellLayout customScreen = mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID);
1809 final CellLayout layout = (CellLayout) getPageAt(i);
1826 CellLayout cl = (CellLayout) getChildAt(i);
1939 CellLayout cl = ((CellLayout) getChildAt(i));
1991 updateAccessibilityFlags((CellLayout) getPageAt(i), i);
2004 private void updateAccessibilityFlags(CellLayout page, int pageNo) {
2202 public void startDrag(CellLayout.CellInfo cellInfo) {
2207 public void startDrag(CellLayout.CellInfo cellInfo, boolean accessible) {
2217 CellLayout layout = (CellLayout) child.getParent().getParent();
2359 CellLayout dropTargetLayout = mDropToLayout;
2379 final CellLayout.CellInfo dragCellInfo = mDragInfo;
2413 null, mTargetCell, resultSpan, CellLayout.MODE_ACCEPT_DROP);
2442 boolean willCreateUserFolder(ItemInfo info, CellLayout target, int[] targetCell, float
2448 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
2471 boolean willAddToExistingUserFolder(Object dragInfo, CellLayout target, int[] targetCell,
2477 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
2492 boolean createUserFolderIfNecessary(View newView, long container, CellLayout target,
2500 CellLayout cellParent = getParentCellLayoutForView(mDragInfo.cell);
2545 boolean addToExistingFolderIfNecessary(View newView, CellLayout target, int[] targetCell,
2573 CellLayout dropTargetLayout = mDropToLayout;
2638 mTargetCell, resultSpan, CellLayout.MODE_ON_DROP);
2662 CellLayout parentCell = getParentCellLayoutForView(cell);
2673 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams();
2682 final CellLayout cellLayout = dropTargetLayout;
2693 dragLayer.addResizeFrame(info, hostView, cellLayout);
2712 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams();
2715 CellLayout layout = (CellLayout) cell.getParent().getParent();
2720 final CellLayout parent = (CellLayout) cell.getParent().getParent();
2763 CellLayout child = (CellLayout) getChildAt(getNextPage());
2804 CellLayout layout = getCurrentDropLayout();
2826 if (orientation == CellLayout.LANDSCAPE) {
2837 } else if (orientation == CellLayout.PORTRAIT) {
2864 mDropToLayout = (CellLayout) getPageAt(getNextPage());
2906 void setCurrentDropLayout(CellLayout layout) {
2920 void setCurrentDragOverlappingLayout(CellLayout layout) {
2988 * Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's
3029 * Convert the 2D coordinate xy from this CellLayout's coordinate space to
3046 * This method returns the CellLayout that is currently being dragged to. In order to drag
3047 * to a CellLayout, either the touch point must be directly over the CellLayout, or as a second
3048 * strategy, we see if the dragView is overlapping any CellLayout and choose the closest one
3050 * Return null if no CellLayout is currently being dragged over
3053 private CellLayout findMatchingPageForDragOver(
3058 CellLayout bestMatchingScreen = null;
3067 CellLayout cl = (CellLayout) getChildAt(i);
3070 // Transform the touch coordinates to the CellLayout's local coordinates
3090 // Calculate the distance between the center of the CellLayout
3116 CellLayout layout = null;
3220 child, mTargetCell, resultSpan, CellLayout.MODE_SHOW_REORDER_HINT);
3239 private void manageFolderFeedback(ItemInfo info, CellLayout targetLayout,
3282 CellLayout layout;
3286 public FolderCreationAlarmListener(CellLayout layout, int cellX, int cellY) {
3334 child, mTargetCell, resultSpan, CellLayout.MODE_DRAG_OVER);
3361 public boolean addExternalItemToScreen(ItemInfo dragInfo, CellLayout layout) {
3363 onDropExternal(dragInfo.dropPos, (ItemInfo) dragInfo, (CellLayout) layout, false);
3371 CellLayout cellLayout, boolean insertAtFirst) {
3372 onDropExternal(touchXY, dragInfo, cellLayout, insertAtFirst, null);
3384 final CellLayout cellLayout, boolean insertAtFirst, DragObject d) {
3401 final long container = mLauncher.isHotseatLayout(cellLayout) ?
3404 final long screenId = getIdForScreen(cellLayout);
3405 if (!mLauncher.isHotseatLayout(cellLayout)
3417 cellLayout, mTargetCell);
3418 float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],
3420 if (willCreateUserFolder((ItemInfo) d.dragInfo, cellLayout, mTargetCell,
3422 cellLayout, mTargetCell, distance)) {
3437 mTargetCell = cellLayout.performReorder((int) mDragViewVisualCenter[0],
3439 null, mTargetCell, resultSpan, CellLayout.MODE_ON_DROP_EXTERNAL);
3478 animateWidgetDrop(info, cellLayout, d.dragView, onAnimationCompleteRunnable,
3491 view = mLauncher.createShortcut(cellLayout, (ShortcutInfo) info);
3494 view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout,
3505 cellLayout, mTargetCell);
3506 float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],
3509 if (createUserFolderIfNecessary(view, container, cellLayout, mTargetCell, distance,
3513 if (addToExistingFolderIfNecessary(view, cellLayout, mTargetCell, distance, d,
3521 mTargetCell = cellLayout.performReorder((int) mDragViewVisualCenter[0],
3523 null, mTargetCell, null, CellLayout.MODE_ON_DROP_EXTERNAL);
3525 cellLayout.findCellForSpan(mTargetCell, 1, 1);
3534 cellLayout.onDropChild(view);
3535 cellLayout.getShortcutsAndWidgets().measureChild(view);
3539 // cellLayout to its final transform -- this means we animate the drag view to
3541 setFinalTransitionTransform(cellLayout);
3544 resetTransitionTransform(cellLayout);
3569 DragView dragView, CellLayout layout, ItemInfo info, int[] targetCell,
3604 public void animateWidgetDrop(ItemInfo info, CellLayout cellLayout, DragView dragView,
3613 getFinalPositionForDropAnimation(finalPos, scaleXY, dragView, cellLayout, info, mTargetCell,
3663 public void setFinalTransitionTransform(CellLayout layout) {
3670 public void resetTransitionTransform(CellLayout layout) {
3678 * Return the current {@link CellLayout}, correctly picking the destination
3681 public CellLayout getCurrentDropLayout() {
3682 return (CellLayout) getChildAt(getNextPage());
3691 public CellLayout.CellInfo getDragInfo() {
3705 int spanX, int spanY, CellLayout layout, int[] recycle) {
3741 final CellLayout cellLayout = mLauncher.getCellLayout(
3743 if (cellLayout != null) {
3744 cellLayout.onDropChild(mDragInfo.cell);
3746 throw new RuntimeException("Invalid state: cellLayout == null in "
3762 CellLayout parentCell = getParentCellLayoutForView(v);
3788 void updateItemLocationsInDatabase(CellLayout cl) {
3812 saveWorkspaceScreenToDb((CellLayout) mLauncher.getHotseat().getLayout());
3815 CellLayout cl = (CellLayout) getChildAt(i);
3820 void saveWorkspaceScreenToDb(CellLayout cl) {
3897 CellLayout cl = (CellLayout) getChildAt(child);
3964 CellLayout layout = (CellLayout) getChildAt(page);
3981 CellLayout layout = getCurrentDropLayout();
3997 * Returns a specific CellLayout
3999 CellLayout getParentCellLayoutForView(View v) {
4000 ArrayList<CellLayout> layouts = getWorkspaceAndHotseatCellLayouts();
4001 for (CellLayout layout : layouts) {
4012 ArrayList<CellLayout> getWorkspaceAndHotseatCellLayouts() {
4013 ArrayList<CellLayout> layouts = new ArrayList<CellLayout>();
4016 layouts.add(((CellLayout) getChildAt(screen)));
4034 childrenLayouts.add(((CellLayout) getChildAt(screen)).getShortcutsAndWidgets());
4140 ArrayList<CellLayout> cellLayouts = getWorkspaceAndHotseatCellLayouts();
4141 for (CellLayout layoutParent : cellLayouts) {
4174 ArrayList<CellLayout> cellLayouts = getWorkspaceAndHotseatCellLayouts();
4175 for (final CellLayout layoutParent: cellLayouts) {
4480 CellLayout cl = (CellLayout) view.getParent().getParent();