From 930d0e6cd751b42d4af53603c631491b8e8852f6 Mon Sep 17 00:00:00 2001 From: John Andrew Camu Date: Sat, 22 Jun 2024 12:58:43 +0800 Subject: [PATCH 01/11] Add Support for big screen (#4461) * Initial Support for big screen * Fixed regressions * Don't recalculate when device isTablet --- lawnchair/AndroidManifest.xml | 1 + .../widgets_two_pane_sheet_paged_view.xml | 119 +++ .../widgets_two_pane_sheet_recyclerview.xml | 68 ++ lawnchair/res/layout/workspace_screen.xml | 23 + .../res/layout/workspace_screen_foldable.xml | 23 + lawnchair/res/values/config.xml | 2 +- lawnchair/res/xml/default_workspace_4x4.xml | 87 ++ .../views/SearchResultRightLeftIcon.kt | 5 +- .../search/LawnchairSearchAdapterProvider.kt | 2 +- quickstep/res/values/dimens.xml | 2 + .../uioverrides/states/AllAppsState.java | 4 +- res/values/attrs.xml | 39 +- res/values/config.xml | 2 + src/com/android/launcher3/DeviceProfile.java | 962 +++++++++++------- .../launcher3/InvariantDeviceProfile.java | 40 +- .../allapps/ActivityAllAppsContainerView.java | 8 +- .../launcher3/allapps/FloatingHeaderView.java | 4 +- .../launcher3/allapps/WorkModeSwitch.java | 3 +- .../launcher3/config/FeatureFlags.java | 2 +- .../launcher3/responsive/AllAppsSpecs.kt | 104 -- .../launcher3/responsive/FolderSpecs.kt | 105 -- .../launcher3/responsive/HotseatSpecs.kt | 122 --- .../responsive/HotseatSpecsProvider.kt | 182 ++++ .../responsive/ResponsiveCellSpecsProvider.kt | 200 ++++ .../{ResponsiveSpecs.kt => ResponsiveSpec.kt} | 189 ++-- .../responsive/ResponsiveSpecGroup.kt | 94 ++ .../responsive/ResponsiveSpecsParser.kt | 105 +- .../responsive/ResponsiveSpecsProvider.kt | 137 +++ .../android/launcher3/responsive/SizeSpec.kt | 4 + .../launcher3/responsive/WorkspaceSpecs.kt | 98 -- .../launcher3/util/CellContentDimensions.kt | 69 ++ .../launcher3/util/DisplayController.java | 130 ++- .../android/launcher3/util/IconSizeSteps.kt | 10 +- .../util/window/WindowManagerProxy.java | 33 +- 34 files changed, 1979 insertions(+), 999 deletions(-) create mode 100644 lawnchair/res/layout/widgets_two_pane_sheet_paged_view.xml create mode 100644 lawnchair/res/layout/widgets_two_pane_sheet_recyclerview.xml create mode 100644 lawnchair/res/layout/workspace_screen.xml create mode 100644 lawnchair/res/layout/workspace_screen_foldable.xml create mode 100644 lawnchair/res/xml/default_workspace_4x4.xml delete mode 100644 src/com/android/launcher3/responsive/AllAppsSpecs.kt delete mode 100644 src/com/android/launcher3/responsive/FolderSpecs.kt delete mode 100644 src/com/android/launcher3/responsive/HotseatSpecs.kt create mode 100644 src/com/android/launcher3/responsive/HotseatSpecsProvider.kt create mode 100644 src/com/android/launcher3/responsive/ResponsiveCellSpecsProvider.kt rename src/com/android/launcher3/responsive/{ResponsiveSpecs.kt => ResponsiveSpec.kt} (52%) create mode 100644 src/com/android/launcher3/responsive/ResponsiveSpecGroup.kt create mode 100644 src/com/android/launcher3/responsive/ResponsiveSpecsProvider.kt delete mode 100644 src/com/android/launcher3/responsive/WorkspaceSpecs.kt create mode 100644 src/com/android/launcher3/util/CellContentDimensions.kt diff --git a/lawnchair/AndroidManifest.xml b/lawnchair/AndroidManifest.xml index e1d5efb76fd..e7de5f4cb3b 100644 --- a/lawnchair/AndroidManifest.xml +++ b/lawnchair/AndroidManifest.xml @@ -32,6 +32,7 @@ + diff --git a/lawnchair/res/layout/widgets_two_pane_sheet_paged_view.xml b/lawnchair/res/layout/widgets_two_pane_sheet_paged_view.xml new file mode 100644 index 00000000000..442957a9be7 --- /dev/null +++ b/lawnchair/res/layout/widgets_two_pane_sheet_paged_view.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +