Home
last modified time | relevance | path

Searched refs:grid (Results 1 – 25 of 66) sorted by relevance

123

/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/util/
DGridOccupancyTest.java19 GridOccupancy grid = initGrid(4, in testFindVacantCell() local
27 assertTrue(grid.findVacantCell(vacant, 2, 2)); in testFindVacantCell()
31 assertTrue(grid.findVacantCell(vacant, 3, 2)); in testFindVacantCell()
35 assertFalse(grid.findVacantCell(vacant, 3, 3)); in testFindVacantCell()
40 GridOccupancy grid = initGrid(4, in testIsRegionVacant() local
47 assertTrue(grid.isRegionVacant(4, 0, 1, 4)); in testIsRegionVacant()
48 assertTrue(grid.isRegionVacant(0, 1, 2, 2)); in testIsRegionVacant()
49 assertTrue(grid.isRegionVacant(2, 2, 3, 2)); in testIsRegionVacant()
51 assertFalse(grid.isRegionVacant(3, 0, 2, 4)); in testIsRegionVacant()
52 assertFalse(grid.isRegionVacant(0, 0, 2, 1)); in testIsRegionVacant()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DDropTargetBar.java84 DeviceProfile grid = Launcher.getLauncher(getContext()).getDeviceProfile(); in setInsets() local
85 mIsVertical = grid.isVerticalBarLayout(); in setInsets()
93 if (grid.isVerticalBarLayout()) { in setInsets()
94 lp.width = grid.dropTargetBarSizePx; in setInsets()
95 lp.height = grid.availableHeightPx - 2 * grid.edgeMarginPx; in setInsets()
96 lp.gravity = grid.isSeascape() ? Gravity.RIGHT : Gravity.LEFT; in setInsets()
97 tooltipLocation = grid.isSeascape() ? TOOLTIP_LEFT : TOOLTIP_RIGHT; in setInsets()
100 if (grid.isTablet) { in setInsets()
103 gap = ((grid.widthPx - 2 * grid.edgeMarginPx in setInsets()
104 - (grid.inv.numColumns * grid.cellWidthPx)) in setInsets()
[all …]
DHotseat.java100 DeviceProfile grid = mActivity.getDeviceProfile(); in setInsets() local
102 if (grid.isVerticalBarLayout()) { in setInsets()
105 if (grid.isSeascape()) { in setInsets()
107 lp.width = grid.hotseatBarSizePx + insets.left; in setInsets()
110 lp.width = grid.hotseatBarSizePx + insets.right; in setInsets()
116 lp.height = (grid.isTaskbarPresent in setInsets()
117 ? grid.workspacePadding.bottom in setInsets()
118 : grid.hotseatBarSizePx) in setInsets()
119 + (grid.isTaskbarPresent ? grid.taskbarSize : insets.bottom); in setInsets()
122 if (!grid.isTaskbarPresent) { in setInsets()
[all …]
DBubbleTextView.java174 DeviceProfile grid = mActivity.getDeviceProfile(); in BubbleTextView() local
179 setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx); in BubbleTextView()
180 setCompoundDrawablePadding(grid.iconDrawablePaddingPx); in BubbleTextView()
181 defaultIconSize = grid.iconSizePx; in BubbleTextView()
182 setCenterVertically(grid.isScalableGrid); in BubbleTextView()
184 setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.allAppsIconTextSizePx); in BubbleTextView()
185 setCompoundDrawablePadding(grid.allAppsIconDrawablePaddingPx); in BubbleTextView()
186 defaultIconSize = grid.allAppsIconSizePx; in BubbleTextView()
188 setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.folderChildTextSizePx); in BubbleTextView()
189 setCompoundDrawablePadding(grid.folderChildDrawablePaddingPx); in BubbleTextView()
[all …]
DInvariantDeviceProfile.java233 DisplayOption result = new DisplayOption(defaultDisplayOption.grid) in InvariantDeviceProfile()
273 return displayOption.grid.name; in initGrid()
280 GridOption closestProfile = displayOption.grid; in initGrid()
417 if (gridName.equals(option.grid.name)) { in getPredefinedDeviceProfiles()
505 GridOption closestOption = points.get(0).grid; in invDistWeightedInterpolate()
658 public final GridOption grid; field in InvariantDeviceProfile.DisplayOption
675 DisplayOption(GridOption grid, Context context, AttributeSet attrs, int defaultFlagValue) { in DisplayOption() argument
676 this.grid = grid; in DisplayOption()
709 DisplayOption(GridOption grid) { in DisplayOption() argument
710 this.grid = grid; in DisplayOption()
/packages/apps/Launcher3/src/com/android/launcher3/states/
DSpringLoadedState.java49 DeviceProfile grid = launcher.getDeviceProfile(); in getWorkspaceScaleAndTranslation() local
55 if (grid.isVerticalBarLayout()) { in getWorkspaceScaleAndTranslation()
56 float scale = grid.workspaceSpringLoadShrinkFactor; in getWorkspaceScaleAndTranslation()
60 float scale = grid.workspaceSpringLoadShrinkFactor; in getWorkspaceScaleAndTranslation()
62 int insetsBottom = grid.isTaskbarPresent ? grid.taskbarSize : insets.bottom; in getWorkspaceScaleAndTranslation()
65 float shrunkTop = insets.top + grid.dropTargetBarSizePx; in getWorkspaceScaleAndTranslation()
67 - grid.workspacePadding.bottom in getWorkspaceScaleAndTranslation()
68 - grid.workspaceSpringLoadedBottomSpace; in getWorkspaceScaleAndTranslation()
/packages/apps/Launcher3/src/com/android/launcher3/secondarydisplay/
DSecondaryDragLayer.java110 DeviceProfile grid = mActivity.getDeviceProfile(); in onMeasure() local
115 int padding = 2 * (grid.desiredWorkspaceLeftRightMarginPx in onMeasure()
116 + grid.cellLayoutPaddingLeftRightPx); in onMeasure()
118 int maxWidth = grid.allAppsCellWidthPx * grid.numShownAllAppsColumns + padding; in onMeasure()
121 int maxHeight = grid.allAppsCellHeightPx * grid.numShownAllAppsColumns + padding; in onMeasure()
128 int appsButtonSpec = makeMeasureSpec(grid.iconSizePx, EXACTLY); in onMeasure()
133 grid.iconSizePx + grid.edgeMarginPx); in onMeasure()
/packages/modules/NeuralNetworks/common/operations/
DHeatmapMaxKeypoint.cpp56 static void solveForDelta(const float grid[3][3], float* delta, float* deltaScore, in solveForDelta()
61 b[0] = -(grid[1][2] - grid[1][0]) / 2.0f; in solveForDelta()
62 b[1] = -(grid[2][1] - grid[0][1]) / 2.0f; in solveForDelta()
63 A[0][0] = grid[1][0] - 2.0f * grid[1][1] + grid[1][2]; in solveForDelta()
64 A[0][1] = (grid[2][2] - grid[2][0] - grid[0][2] + grid[0][0]) / 4.0f; in solveForDelta()
66 A[1][1] = grid[0][1] - 2.0f * grid[1][1] + grid[2][1]; in solveForDelta()
83 *deltaScore = grid[1][1] - b[0] * delta[0] - b[1] * delta[1] + in solveForDelta()
/packages/apps/Launcher3/src/com/android/launcher3/pageindicators/
DWorkspacePageIndicator.java260 DeviceProfile grid = mLauncher.getDeviceProfile(); in setInsets() local
263 if (grid.isVerticalBarLayout()) { in setInsets()
264 Rect padding = grid.workspacePadding; in setInsets()
265 lp.leftMargin = padding.left + grid.workspaceCellPaddingXPx; in setInsets()
266 lp.rightMargin = padding.right + grid.workspaceCellPaddingXPx; in setInsets()
271 lp.bottomMargin = grid.isTaskbarPresent in setInsets()
272 ? grid.workspacePadding.bottom + grid.taskbarSize in setInsets()
273 : grid.hotseatBarSizePx + insets.bottom; in setInsets()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DStaggeredWorkspaceAnim.java94 DeviceProfile grid = launcher.getDeviceProfile(); in StaggeredWorkspaceAnim() local
99 int totalRows = grid.inv.numRows + (grid.isVerticalBarLayout() ? 0 : 2); in StaggeredWorkspaceAnim()
116 if (grid.isVerticalBarLayout()) { in StaggeredWorkspaceAnim()
125 if (grid.isTaskbarPresent) { in StaggeredWorkspaceAnim()
126 qsbRow = grid.inv.numRows + 1; in StaggeredWorkspaceAnim()
127 hotseatRow = grid.inv.numRows + 2; in StaggeredWorkspaceAnim()
129 hotseatRow = grid.inv.numRows + 1; in StaggeredWorkspaceAnim()
130 qsbRow = grid.inv.numRows + 2; in StaggeredWorkspaceAnim()
/packages/apps/Launcher3/src/com/android/launcher3/allapps/
DAllAppsRecyclerView.java106 DeviceProfile grid = BaseDraggingActivity.fromContext(getContext()).getDeviceProfile(); in updatePoolSize() local
108 int approxRows = (int) Math.ceil(grid.availableHeightPx / grid.allAppsIconSizePx); in updatePoolSize()
116 mViewHeights.put(AllAppsGridAdapter.VIEW_TYPE_ICON, grid.allAppsCellHeightPx); in updatePoolSize()
458 DeviceProfile grid = BaseDraggingActivity.fromContext(getContext()).getDeviceProfile();
460 int iconPadding = totalWidth / grid.numShownAllAppsColumns - grid.allAppsIconSizePx;
461 return totalWidth - iconPadding - grid.allAppsIconDrawablePaddingPx;
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DPendingAppWidgetHostView.java231 DeviceProfile grid = mLauncher.getDeviceProfile(); in updateDrawableBounds() local
244 int maxSize = grid.iconSizePx; in updateDrawableBounds()
262 int actualIconSize = (int) Math.min(iconSize, grid.iconSizePx); in updateDrawableBounds()
277 + grid.iconDrawablePaddingPx; in updateDrawableBounds()
282 grid.iconDrawablePaddingPx - actualIconSize) / 2; in updateDrawableBounds()
303 mRect.top = mCenterDrawable.getBounds().bottom + grid.iconDrawablePaddingPx; in updateDrawableBounds()
DNavigableAppWidgetHostView.java243 public void getWidgetInset(DeviceProfile grid, Rect out) { in getWidgetInset() argument
244 if (!grid.shouldInsetWidgets()) { in getWidgetInset()
250 out.set(grid.inv.defaultWidgetPadding); in getWidgetInset()
/packages/apps/ThemePicker/src/com/android/customization/module/
DThemesUserEventLogger.java19 import com.android.customization.model.grid.GridOption;
44 void logGridSelected(GridOption grid); in logGridSelected() argument
46 void logGridApplied(GridOption grid); in logGridApplied() argument
DStatsLogUserEventLogger.java47 import com.android.customization.model.grid.GridOption;
176 public void logGridSelected(GridOption grid) { in logGridSelected() argument
179 grid.cols, in logGridSelected()
184 public void logGridApplied(GridOption grid) { in logGridApplied() argument
187 grid.cols, in logGridApplied()
/packages/apps/ThemePicker/tests/src/com/android/customization/testing/
DTestThemesUserEventLogger.java4 import com.android.customization.model.grid.GridOption;
40 public void logGridSelected(GridOption grid) { in logGridSelected() argument
45 public void logGridApplied(GridOption grid) { in logGridApplied() argument
/packages/apps/ThemePicker/robolectric_tests/src/com/android/customization/model/grid/
DGridOptionsManagerTest.java16 package com.android.customization.model.grid;
53 GridOption grid = new GridOption("testTitle", gridName, false, 2, 2, null, 1, ""); in testApply() local
56 mManager.apply(grid, new Callback() { in testApply()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/
DLauncherTaskbarUIController.java234 DeviceProfile grid = mLauncher.getDeviceProfile();
235 int hotseatHeight = grid.workspacePadding.bottom + grid.taskbarSize;
237 int hotseatTopDiff = hotseatHeight - grid.taskbarSize - taskbarOffset;
/packages/apps/ThemePicker/src/com/android/customization/picker/grid/
DGridOptionPreviewer.java16 package com.android.customization.picker.grid;
23 import com.android.customization.model.grid.GridOption;
24 import com.android.customization.model.grid.GridOptionsManager;
/packages/apps/ThemePicker/src/com/android/customization/model/grid/
DGridSectionController.java16 package com.android.customization.model.grid;
27 import com.android.customization.picker.grid.GridFragment;
28 import com.android.customization.picker.grid.GridSectionView;
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/hybridhotseat/
DHotseatEduDialog.java87 DeviceProfile grid = mActivityContext.getDeviceProfile(); in onFinishInflate() local
88 Rect padding = grid.getHotseatLayoutPadding(); in onFinishInflate()
90 mSampleHotseat.getLayoutParams().height = grid.cellHeightPx; in onFinishInflate()
91 mSampleHotseat.setGridSize(grid.numShownHotseatIcons, 1); in onFinishInflate()
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DItemLongClickListener.java112 DeviceProfile grid = launcher.getDeviceProfile(); in onAllAppsItemLongClick() local
114 options.intrinsicIconScaleFactor = (float) grid.allAppsIconSizePx / grid.iconSizePx; in onAllAppsItemLongClick()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/views/
DAllAppsEduView.java265 DeviceProfile grid = launcher.getDeviceProfile(); in init() local
268 lp.leftMargin = (grid.widthPx - mWidthPx) / 2; in init()
269 lp.topMargin = grid.heightPx - grid.hotseatBarSizePx - mMaxHeightPx; in init()
/packages/apps/DocumentsUI/src/com/android/documentsui/picker/
DMenuManager.java95 protected void updateModePicker(MenuItem grid, MenuItem list) { in updateModePicker() argument
98 Menus.setEnabledAndVisible(grid, false); in updateModePicker()
101 super.updateModePicker(grid, list); in updateModePicker()
/packages/apps/Launcher3/src/com/android/launcher3/folder/
DFolderIcon.java191 DeviceProfile grid = activity.getDeviceProfile(); in inflateIcon() local
200 lp.topMargin = grid.iconSizePx + grid.iconDrawablePaddingPx; in inflateIcon()
206 icon.mDotRenderer = grid.mDotRendererWorkSpace; in inflateIcon()
400 DeviceProfile grid = mActivity.getDeviceProfile(); in onDrop()
401 float containerScale = (1f * grid.iconSizePx / grid.allAppsIconSizePx); in onDrop()

123