Lines Matching defs:cellLayout
141 private HashMap<Long, CellLayout> mWorkspaceScreens = new HashMap<Long, CellLayout>();
150 private CellLayout.CellInfo mDragInfo;
168 * The CellLayout that is currently being dragged over
170 private CellLayout mDragTargetLayout = null;
172 * The CellLayout that we will show as glowing
174 private CellLayout mDragOverlappingLayout = null;
177 * The CellLayout which will be dropped to
179 private CellLayout mDropToLayout = null;
367 CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
383 CellLayout cl = (CellLayout) getChildAt(numCustomPages());
399 public Rect estimateItemPosition(CellLayout cl, ItemInfo pendingInfo,
500 if (!(child instanceof CellLayout)) {
501 throw new IllegalArgumentException("A Workspace can only have CellLayout children.");
503 CellLayout cl = ((CellLayout) child);
511 final CellLayout cl = (CellLayout) child;
583 CellLayout newScreen = (CellLayout)
596 CellLayout customScreen = (CellLayout)
621 CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
655 CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
658 CellLayout.LayoutParams lp = new CellLayout.LayoutParams(0, 0, spanX, spanY);
691 CellLayout cl = (CellLayout) mDragSourceInternal.getParent();
731 CellLayout finalScreen = mWorkspaceScreens.get(finalScreenId);
804 final CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
853 CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
872 public CellLayout getScreenWithId(long screenId) {
873 CellLayout layout = mWorkspaceScreens.get(screenId);
877 public long getIdForScreen(CellLayout layout) {
922 CellLayout cl = mWorkspaceScreens.get(id);
935 CellLayout cl = mWorkspaceScreens.get(id);
1011 final CellLayout layout;
1037 CellLayout.LayoutParams lp;
1038 if (genericLp == null || !(genericLp instanceof CellLayout.LayoutParams)) {
1039 lp = new CellLayout.LayoutParams(x, y, spanX, spanY);
1041 lp = (CellLayout.LayoutParams) genericLp;
1061 Launcher.addDumpLog(TAG, "Failed to add to item at (" + lp.cellX + "," + lp.cellY + ") to CellLayout", true);
1074 * Called directly from a CellLayout (not by the framework), after we've been added as a
1075 * listener via setOnInterceptTouchEventListener(). This allows us to tell the CellLayout
1118 final CellLayout currentPage = (CellLayout) getChildAt(mCurrentPage);
1141 CellLayout cl = (CellLayout) getChildAt(i);
1598 CellLayout cl = (CellLayout) getChildAt(i);
1657 CellLayout child = (CellLayout) getChildAt(i);
1670 CellLayout child = (CellLayout) getChildAt(i);
1709 CellLayout cc = mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID);
1766 CellLayout cl = (CellLayout) getChildAt(index);
1774 ((CellLayout) getChildAt(0)).setOverScrollAmount(0, false);
1775 ((CellLayout) getChildAt(getChildCount() - 1)).setOverScrollAmount(0, false);
1883 final CellLayout layout = (CellLayout) getChildAt(i);
1892 final CellLayout layout = (CellLayout) getChildAt(i);
1911 final CellLayout cl = (CellLayout) getChildAt(i);
1933 final CellLayout customScreen = mWorkspaceScreens.get(CUSTOM_CONTENT_SCREEN_ID);
1935 final CellLayout layout = (CellLayout) getPageAt(i);
1952 CellLayout cl = (CellLayout) getChildAt(i);
2142 CellLayout cl = ((CellLayout) getChildAt(i));
2310 final CellLayout cl = (CellLayout) getChildAt(i);
2360 final CellLayout cl = (CellLayout) getChildAt(i);
2704 void startDrag(CellLayout.CellInfo cellInfo) {
2714 CellLayout layout = (CellLayout) child.getParent().getParent();
2831 void addApplicationShortcut(ShortcutInfo info, CellLayout target, long container, long screenId,
2853 CellLayout dropTargetLayout = mDropToLayout;
2874 final CellLayout.CellInfo dragCellInfo = mDragInfo;
2908 null, mTargetCell, resultSpan, CellLayout.MODE_ACCEPT_DROP);
2937 boolean willCreateUserFolder(ItemInfo info, CellLayout target, int[] targetCell, float
2943 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
2966 boolean willAddToExistingUserFolder(Object dragInfo, CellLayout target, int[] targetCell,
2972 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) dropOverView.getLayoutParams();
2987 boolean createUserFolderIfNecessary(View newView, long container, CellLayout target,
2995 CellLayout cellParent = getParentCellLayoutForView(mDragInfo.cell);
3040 boolean addToExistingFolderIfNecessary(View newView, CellLayout target, int[] targetCell,
3067 CellLayout dropTargetLayout = mDropToLayout;
3132 mTargetCell, resultSpan, CellLayout.MODE_ON_DROP);
3156 CellLayout parentCell = getParentCellLayoutForView(cell);
3167 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams();
3176 final CellLayout cellLayout = dropTargetLayout;
3187 dragLayer.addResizeFrame(info, hostView, cellLayout);
3206 CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams();
3209 CellLayout layout = (CellLayout) cell.getParent().getParent();
3214 final CellLayout parent = (CellLayout) cell.getParent().getParent();
3250 CellLayout cl = (CellLayout) getChildAt(pageIndex);
3264 CellLayout cl = (CellLayout) getChildAt(pageIndex);
3290 CellLayout layout = getCurrentDropLayout();
3311 if (orientation == CellLayout.LANDSCAPE) {
3313 Rect padding = grid.getWorkspacePadding(CellLayout.LANDSCAPE);
3322 } else if (orientation == CellLayout.PORTRAIT) {
3324 Rect padding = grid.getWorkspacePadding(CellLayout.PORTRAIT);
3346 mDropToLayout = (CellLayout) getPageAt(getNextPage());
3373 void setCurrentDropLayout(CellLayout layout) {
3387 void setCurrentDragOverlappingLayout(CellLayout layout) {
3455 * Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's
3497 * Convert the 2D coordinate xy from this CellLayout's coordinate space to
3514 * This method returns the CellLayout that is currently being dragged to. In order to drag
3515 * to a CellLayout, either the touch point must be directly over the CellLayout, or as a second
3516 * strategy, we see if the dragView is overlapping any CellLayout and choose the closest one
3518 * Return null if no CellLayout is currently being dragged over
3521 private CellLayout findMatchingPageForDragOver(
3526 CellLayout bestMatchingScreen = null;
3535 CellLayout cl = (CellLayout) getChildAt(i);
3538 // Transform the touch coordinates to the CellLayout's local coordinates
3558 // Calculate the distance between the center of the CellLayout
3616 CellLayout layout = null;
3721 child, mTargetCell, resultSpan, CellLayout.MODE_SHOW_REORDER_HINT);
3740 private void manageFolderFeedback(ItemInfo info, CellLayout targetLayout,
3777 CellLayout layout;
3781 public FolderCreationAlarmListener(CellLayout layout, int cellX, int cellY) {
3829 child, mTargetCell, resultSpan, CellLayout.MODE_DRAG_OVER);
3856 public boolean addExternalItemToScreen(ItemInfo dragInfo, CellLayout layout) {
3858 onDropExternal(dragInfo.dropPos, (ItemInfo) dragInfo, (CellLayout) layout, false);
3866 CellLayout cellLayout, boolean insertAtFirst) {
3867 onDropExternal(touchXY, dragInfo, cellLayout, insertAtFirst, null);
3879 final CellLayout cellLayout, boolean insertAtFirst, DragObject d) {
3896 final long container = mLauncher.isHotseatLayout(cellLayout) ?
3899 final long screenId = getIdForScreen(cellLayout);
3900 if (!mLauncher.isHotseatLayout(cellLayout)
3912 cellLayout, mTargetCell);
3913 float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],
3915 if (willCreateUserFolder((ItemInfo) d.dragInfo, cellLayout, mTargetCell,
3917 cellLayout, mTargetCell, distance)) {
3932 mTargetCell = cellLayout.performReorder((int) mDragViewVisualCenter[0],
3934 null, mTargetCell, resultSpan, CellLayout.MODE_ON_DROP_EXTERNAL);
3985 animateWidgetDrop(info, cellLayout, d.dragView, onAnimationCompleteRunnable,
3998 view = mLauncher.createShortcut(R.layout.application, cellLayout,
4002 view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout,
4013 cellLayout, mTargetCell);
4014 float distance = cellLayout.getDistanceFromCell(mDragViewVisualCenter[0],
4017 if (createUserFolderIfNecessary(view, container, cellLayout, mTargetCell, distance,
4021 if (addToExistingFolderIfNecessary(view, cellLayout, mTargetCell, distance, d,
4029 mTargetCell = cellLayout.performReorder((int) mDragViewVisualCenter[0],
4031 null, mTargetCell, null, CellLayout.MODE_ON_DROP_EXTERNAL);
4033 cellLayout
4042 cellLayout.onDropChild(view);
4043 cellLayout.getShortcutsAndWidgets().measureChild(view);
4047 // cellLayout to its final transform -- this means we animate the drag view to
4049 setFinalTransitionTransform(cellLayout);
4052 resetTransitionTransform(cellLayout);
4078 DragView dragView, CellLayout layout, ItemInfo info, int[] targetCell,
4113 public void animateWidgetDrop(ItemInfo info, CellLayout cellLayout, DragView dragView,
4122 getFinalPositionForDropAnimation(finalPos, scaleXY, dragView, cellLayout, info, mTargetCell,
4170 public void setFinalTransitionTransform(CellLayout layout) {
4177 public void resetTransitionTransform(CellLayout layout) {
4185 * Return the current {@link CellLayout}, correctly picking the destination
4188 public CellLayout getCurrentDropLayout() {
4189 return (CellLayout) getChildAt(getNextPage());
4198 public CellLayout.CellInfo getDragInfo() {
4212 int spanX, int spanY, CellLayout layout, int[] recycle) {
4245 CellLayout parentCell = getParentCellLayoutForView(mDragInfo.cell);
4256 CellLayout cellLayout;
4258 cellLayout = mLauncher.getHotseat().getLayout();
4260 cellLayout = getScreenWithId(mDragInfo.screenId);
4262 if (cellLayout == null && LauncherAppState.isDogfoodBuild()) {
4263 throw new RuntimeException("Invalid state: cellLayout == null in "
4266 if (cellLayout != null) {
4267 cellLayout.onDropChild(mDragInfo.cell);
4291 void updateItemLocationsInDatabase(CellLayout cl) {
4316 getUniqueIntents((CellLayout) mLauncher.getHotseat().getLayout(), uniqueIntents, duplicates, false);
4319 CellLayout cl = (CellLayout) getChildAt(i);
4325 void getUniqueIntents(CellLayout cl, ArrayList<ComponentName> uniqueIntents,
4397 saveWorkspaceScreenToDb((CellLayout) mLauncher.getHotseat().getLayout());
4400 CellLayout cl = (CellLayout) getChildAt(i);
4405 void saveWorkspaceScreenToDb(CellLayout cl) {
4489 CellLayout cl = (CellLayout) getChildAt(child);
4556 CellLayout layout = (CellLayout) getChildAt(page);
4573 CellLayout layout = getCurrentDropLayout();
4589 * Returns a specific CellLayout
4591 CellLayout getParentCellLayoutForView(View v) {
4592 ArrayList<CellLayout> layouts = getWorkspaceAndHotseatCellLayouts();
4593 for (CellLayout layout : layouts) {
4604 ArrayList<CellLayout> getWorkspaceAndHotseatCellLayouts() {
4605 ArrayList<CellLayout> layouts = new ArrayList<CellLayout>();
4608 layouts.add(((CellLayout) getChildAt(screen)));
4626 childrenLayouts.add(((CellLayout) getChildAt(screen)).getShortcutsAndWidgets());
4732 ArrayList<CellLayout> cellLayouts = getWorkspaceAndHotseatCellLayouts();
4733 for (CellLayout layoutParent : cellLayouts) {
4766 ArrayList<CellLayout> cellLayouts = getWorkspaceAndHotseatCellLayouts();
4767 for (final CellLayout layoutParent: cellLayouts) {
5119 CellLayout cl = (CellLayout) view.getParent().getParent();