Commit Graph

270 Commits

Author SHA1 Message Date
helencheuk
2691cdfa8b Configured color attribute properly for focus outline
Bug: 310953377
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_focus_outline Development
Change-Id: If85c33ecea3241e69927917e910386d0346ef43b
2024-01-15 18:35:11 +00:00
Jordan Silva
d29f0644f2 Update the device twoPanelId specs to use the default spec when it is not defined
In some situations, DeviceProfile is recreated with an invalid InvariantDeviceProfile leading to a crash, because it tries to use an non existent responsive grid spec. To prevent the crash, we are update the responsive grid two panel specs to use the default spec when two panel spec is not defined.

Bug: 317993862
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I8b8095745787ad47b006892452a54942f981713e
2024-01-10 15:11:26 -03:00
Jordan Silva
2de6a277b7 Update responsive grid spec cell size remainderSpace logic
Refactoring the cellSize spec of responsive grid to divide the remainder space in code instead of dividing by cols/rows in the spec definition. For example, instead of using 0.2 in the spec for 5x5 grid (1 / number of rows), it is going to use 1 (100% of the remainder space) and divide the percentage by the number of cols or rows in code.

Fix: 313621277
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: CalculatedWorkspaceSpecTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: Ifaec838ac9751562ecedc1fe39b966ee3d092de3
2024-01-08 19:40:01 -03:00
Thales Lima
1faa4edc42 Make numFolderRows/Columns accept more values
InvariantDeviceProfile hold values that are not related to current DP in use. Now other classes get the value correctly from DeviceProfile, and each posture can hold different values, making it akin to iconSize.

Fix: 309800141
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I32295738585de67205dcd6c8942d08a3d07d169a
2023-12-08 22:00:48 +00:00
Thales Lima
09d42d5340 Revert "Make numFolderRows/numFolderColumns accept more values"
Revert submission 25438456-5x5_folder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25438456-5x5_folder

Revert "Use DeviceProfile numFolderRows and numFolderColumns"
Revert submission 25313018-numFolder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25313018-numFolder

Change-Id: I4890016e310c0a2122861f36fcdbf33e98e727c0
2023-11-30 11:47:37 +00:00
Thales Lima
24051842c7 Make numFolderRows/numFolderColumns accept more values
Now they can hold values for different configurations, making it akin to iconSize.

Bug: 309800141
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I9d5cccda88a0311dbe0beecef194cc8d60c5c280
2023-11-24 15:54:56 +00:00
Jordan Silva
999dd2a06f Extract cell size information to responsive grid structure
Bug: 287975993
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: ResponsiveCellSpecsProviderTest
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Change-Id: I26a87d9b690fdfcff1599d862c09e97fe9f9f930
2023-11-24 12:39:36 +00:00
Jordan Silva
8f7986abae Responsive grid cleanup
This CL renames some of the variables to keep it consistent across the code. It removes workarounds that were made to facilitate easy code reviews without breaking the tests.
It is a cleanup of the responsive grid feature.

Bug: 299889733
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: CalculatedAllAppsSpecTest
Test: CalculatedFolderSpecTest
Test: CalculatedHotseatSpecTest
Test: CalculatedWorkspaceSpecTest
Test: AllAppsSpecsTest
Test: FolderSpecTest
Test: HotseatSpecsTest
Test: WorkspaceSpecsTest
Change-Id: I198fadfbcfc0d1b32a62a3076949b42ee1fbcf33
2023-11-09 22:06:03 +00:00
Jordan Silva
f2402e25f1 Refactoring Responsive Grid XML specs for more flexibility
It merges portrait and landscape XML specs for responsive grid. This update allows the responsive grid to rely on other properties like aspect ratio and not solely the orientation from resource qualifiers.

Bug: 299889733
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: CalculatedAllAppsSpecTest
Test: CalculatedFolderSpecTest
Test: CalculatedHotseatSpecTest
Test: CalculatedWorkspaceSpecTest
Test: AllAppsSpecsTest
Test: FolderSpecTest
Test: HotseatSpecsTest
Test: WorkspaceSpecsTest
Change-Id: I39ee54d49c9d2a54fcbe91c8a1327a21a8126032
2023-11-07 11:51:28 +00:00
Brandon Dayauon
47000ae6e6 Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW
- Create another icon, "all_apps_predicted_row_icon" that will be the mDisplay for the predicted app row
in AllAppsList

Bug:299171695
Test: video
Before: https://drive.google.com/file/d/1HxNW0015nQHCc7eQiySf-gwsHrLs_JjR/view?usp=sharing
after: https://drive.google.com/file/d/1HyEwKI-yumILTCjglKcqovhTlRVjNGxg/view?usp=sharing - making sure that QL is fine and dragging regular Toast results are normal
Flag: N/a
Change-Id: Ie002cacb168396dbea39f79679bd6a04b80e374b
2023-09-20 14:21:10 -07:00
Thales Lima
f8bfb036ba Create specs for hotseat
Some attributes of hotseat change depending on the size of the device. In the future more attributes could be moved to the spec, e.g. hotseat icons.

Fix: 292204436
Test: CalculatedHotseatSpecTest
Test: HotseatSpecsTest
Test: SizeSpecTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I6a4e05d75af819dbf1444a5ca45c2080f55dc203
2023-08-10 10:23:23 +00:00
Jordan Silva
575c3bddec Add twoPanelId attribute for responsive grid in device profile
Three new attributes were created to be used in device profile. These attributes will provide the responsive specs for two panel devices.

Fix: 292204121
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Change-Id: I35c93e16dde043b0fd611b81bf2de74e3621818e
2023-07-21 12:00:43 +01:00
Jordan Silva
8bd7af2b3f Improving responsive grid xml parser
Refactors AllAppsSpecs, FolderSpecs and WorkspaceSpecs initialization to use the same code to parse the xml with different map function. This CL improves the readability of the code and remove code duplication.

Fix: 286538013
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: AllAppsSpecsTes
Test: CalculatedAllAppsSpecTest
Test: CalculatedFolderSpecsTest
Test: CalculatedWorkspaceSpecTest
Test: FolderSpecsTest
Test: WorkspaceSpecsTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Change-Id: Iec5863619399efd2e80f3db46b75c4d785e1656f
2023-07-18 18:03:16 +01:00
Pat Manning
da69661add Show tooltips on cursor hover of taskbar icons.
Fix: 250092437
Test: TaskbarHoverToolTipControllerTest
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: Ia0463518d13b313b354328078685930215fb7636
2023-07-14 13:42:30 +01:00
Brandon Dayauon
f2ea399ec6 Fix prediction row title consistency
There's an inconsistency with prediction row in 0-state and all apps page.
This happens because we change the number of lines (to 1 line) after calculating and rendering the two lines.
Which is why if you look at the photos, in all apps, Amazon app just shows "Amazon" instead of "Amazon Sh.."

Instead of changing the number of lines after processing, just set a separate display to the prediction app row

bug:288811197
Flag: teamfood
Test: manual - locally added test BubbleTextView
before 0-state: https://screenshot.googleplex.com/5q9iYypgwwtDa8b
before allapps prediction row: https://screenshot.googleplex.com/BVxGMTT43stDzZ9
after allapps prediction row: https://screenshot.googleplex.com/BfNTFPXwf4FHuRN

Change-Id: Ifefe6dc8dd4a117be7b63f92ff837d0467a51f8b
2023-06-28 14:45:07 -07:00
Jordan Silva
637f4eb2f3 Update DeviceProfile to calculate responsive grid for folders
It uses the new responsive folder calculations and specs when responsive grid is enabled. The grid has to have folderSpecsId defined to use the new specifications, otherwise it will use the current scalable grid implementation.

Fix: 284155638
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenFolderImageTest
Test: HomeScreenFolderImageTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I535cff4bb00e969f782447a898230fe2b2c05cc9
2023-06-21 12:18:58 +01:00
Thales Lima
abfe364629 Implement calculations of Responsive Grid for AllApps
All Apps follow the same sizes as the workspace, so we copy the measurements to AllApps values.

Bug: 284152932
Test: HomeScreenAllAppsImageTest
Test: DeviceProfileDumpTest
Test: HomeScreenResponsiveAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I12743a6ac5ab5f1a8bc911511bdc7e12b2261d86
2023-06-16 10:19:19 +00:00
Lucas Dupin
fbe96507dd Merge "Merge "Fixing color mismatch for Launcher3/NexusLauncher" into udc-dev am: d469ce2460 am: e3f46ba90b" into udc-qpr-dev 2023-06-15 20:15:11 +00:00
Marcelo Arteiro
d7d49ad4b3 Merge "Fixing color mismatch for Launcher3/NexusLauncher" into udc-dev am: d469ce2460 am: e3f46ba90b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23102625

Change-Id: Iab06fa739fb16e399931ca90ebb2cfdf7afdd738
Merged-In: Iab06fa739fb16e399931ca90ebb2cfdf7afdd738
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 22:25:51 +00:00
Thales Lima
196e44baec Create AllApps responsive spec
Copy the parser from WorkspaceSpec and modify to use AllApps attributes.

Bug: 284152932
Test: AllAppsSpecsTest
Test: CalculatedAllAppsSpecTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I9362e126c64cb1a1abdef61894b003f14701b8e3
2023-06-14 15:02:58 +01:00
Jordan Silva
1b336110a4 Update SizeSpec attributes to accept max size threshold
Add maxSize attribute to SizeSpec to limit the cell size up to a max size when matchWorkspace is true. The same validation was added when using fixedSize, ofAvailableSpace and ofRemainderSpace, so they could have a maxSize as a threshold.

Bug: 284155638
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: SizeSpecTest
Test: WorkspaceSpecsTest
Change-Id: I113657c241e6618eb3e501243412d8c5626fc3d5
2023-06-13 18:09:37 +01:00
Jordan Silva
7ae9e3a6f5 Add FolderSpec for responsive grid support
Adds responsive grid implementation for folders. It follows the same concept as WorkspaceSpecs, so we have a parser similar to WorkspaceSpecs for FolderSpecs.

Bug: 284155638
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: FolderSpecsTest
Test: CalculatedFolderSpecsTest
Change-Id: Iea6d7d88ef42d1273aed7cf2ed5b397035518a52
2023-06-13 15:01:39 +01:00
Jordan Silva
d22a85cd64 Merge "Adding match workspace to SizeSpec for responsive grid support" into udc-qpr-dev 2023-06-09 20:04:54 +00:00
Jordan Silva
2b8556ce1a Adding match workspace to SizeSpec for responsive grid support
Added matchWorkspace property to support responsive grid implementation for AllApps and Folders. This property indicates whether the attribute value will be used from the workspace instead of defining a fixed value in the AllApps and Folders XML. The class was updated to be a data class and added a auxiliar constructor new make it more flexible for testing and to add other initializers to support AllApps and Folders.

Bug: 284155638
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: WorkspaceSpecsTest
Test: SizeSpecTest
Change-Id: I65b71e66be7b8236a1dee62b56a487b87881d991
2023-06-09 17:05:22 +00:00
Marcelo Arteiro
ecff4b59c0 Fixing color mismatch for Launcher3/NexusLauncher
https://screenshot.googleplex.com/7hpgPtjSdjzYFYh

Bug: 268682423
Bug: 277728851
Test: Manual
Change-Id: I7b92ca18721624ef5ecd4b69ca4158ad2dc600f3
2023-06-08 19:01:29 +00:00
Pat Manning
58b6145feb Refactor ArrowTipView so it can be customized and used in any drag layer.
Allows use in TaskbarDragLayer.

Allows customization of properties like text color, background color, and open/close animations.

Bug: 250092437
Test: manual. (Will test with TaplTestsTaskbar in follow up CL when implemented.)
Change-Id: I056395322e5fef7aa4d9fd7e4c2d73c050eff759
2023-06-06 13:46:31 +01:00
Sunny Goyal
3e596d3aa4 Updating the top scrim to also use dynamicaly generated bitmap
Bug: 237818532
Test: Verified on device
Flag: N/A
Change-Id: I22ceb470677ab9df53e40fb78f0292b7fd5e2241
2023-06-01 19:20:04 +00:00
Federico Baron
4b43200910 Merge "Update colors for edit state" into udc-dev 2023-05-18 21:03:19 +00:00
Federico Baron
3eba77ca4b Merge "Update colors for popup menus" into udc-dev 2023-05-18 21:03:19 +00:00
fbaron
e8efdc4bd9 Update colors for edit state
Bug: 268521231
Test: Verify that edit state colors match the figma attached in the bug
Flag: no flag
Change-Id: I72e5ffde48ca2e53b876b2c86ac5d92c8ddf79c0
2023-05-17 09:27:08 -07:00
fbaron
1a76d5c72d Update colors for popup menus
Bug: 268521231
Test: Verify that popup menu colors match the figma attached in the bug
Change-Id: I24025576a789775dfcf17694d16c0d5f6ee844fd
2023-05-16 15:07:30 -07:00
fbaron
8463f6a771 Update folder preview and folder colors
Bug: 268521231
Test: Verify that folder preview and folder colors match the figma attached in the bug
Flag: no flag
Change-Id: Ica75cace98fc2643d59ad0c28cbad736b578c51d
2023-05-16 09:34:37 -07:00
Treehugger Robot
21339533b1 Merge "Update notification dot color" into udc-dev 2023-05-15 20:21:45 +00:00
fbaron
1406a0f606 Update notification dot color
Bug: 268521231
Test: Verify that notification dot colors match the figma attached in the bug
Change-Id: Id0cbf9f2447819ae3e6e00e880eca1be3f189826
2023-05-15 11:06:46 -07:00
Thales Lima
ec5abba93b Add feature flag and attribute for responsive grid
This shouldn't change anything in the grids, only support the creation of responsive grids in the future. For now, to check that the flag works, turn it on and check the dumpsys. There is also a dump test created for this.

Fix: 277064696
Fix: 277064702
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I1bef87043a100234bd661cd6ac00007fdc654116
2023-05-09 12:06:18 +01:00
fbaron
328ca3811c Update colors for widget picker
Bug: 278157622
Test: Look at widget picker on tablet and verify that the colors match the new spec, and verify the portrait mode looks good also.
Change-Id: I634d876dfafc086806b233c500f7d8daddfe7b0b
2023-04-18 16:17:24 -07:00
Sunny Goyal
7b74a5c53f Merge "Revert "Revert "Revert "Simplifying some page indicator dots attributes so that it can"""" into udc-dev 2023-04-07 01:02:09 +00:00
Sunny Goyal
5cd1b198b0 Revert "Revert "Revert "Simplifying some page indicator dots attributes so that it can"""
This reverts commit 7025765c72.

Reason for revert: 274169859

Change-Id: I86a114bf2c713fea6ec7095f68816820ba5f7495
2023-04-06 22:33:11 +00:00
TreeHugger Robot
75f7bbc150 Merge "Allow grids to specify if we should start align taskbar in 3 button nav." into tm-qpr-dev am: 65ac592f40 am: a2b770b484
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22361600

Change-Id: I41eea8cf3fa15c9c5c3f3184f2ba75318332f623
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 22:36:14 +00:00
Jon Miranda
04f051045c Allow grids to specify if we should start align taskbar in 3 button
nav.

Bug: 259712417
Test: check layout on tablet
      check layout on multi_display devices

Change-Id: I282f51e5d76a30e9ad9d8c52d03d4853e965d65a
2023-04-05 10:29:51 -07:00
TreeHugger Robot
331ab34a2a Merge "Revert "Revert "Simplifying some page indicator dots attributes so that it can""" into udc-dev 2023-03-31 20:10:37 +00:00
Sunny Goyal
7025765c72 Revert "Revert "Simplifying some page indicator dots attributes so that it can""
This reverts commit 0263a679f2.

Reason for revert: Trying again to confirm if this was the actual cause of regression

Change-Id: I2a663015d7ecdcf315634d8a976bf8294b58981d
2023-03-31 17:10:15 +00:00
Sunny Goyal
1fc1cd002f Merge "Revert "Simplifying some page indicator dots attributes so that it can"" into udc-dev 2023-03-29 21:22:10 +00:00
Sunny Goyal
0263a679f2 Revert "Simplifying some page indicator dots attributes so that it can"
This reverts commit a5ead45967.

Reason for revert: b/274169859

Change-Id: Id214694ae4f61cd70796c6f7e932c1fdef82d746
2023-03-29 19:11:03 +00:00
Jon Miranda
a97dc04478 Merge "Add taskbarIconSize to GridOption/DisplayOptions" into tm-qpr-dev am: 085c53869f am: 3cd39729dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22228076

Change-Id: I3cb2d462cef1df514c87418ed70ac624899c21fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 23:02:51 +00:00
Jon Miranda
9c478b6c29 Add taskbarIconSize to GridOption/DisplayOptions
- Renamed variables to make it more clear what they represent
- DeviceProfile will be source of truth for taskbar
  sizes

Bug: 265144213
Test: phone, multi-display, tablet
Change-Id: Id9c19d15a65894fd7645e0f876a4b6527b713c34
Flag: ENABLE_TRANSIENT_TASKBAR=true
2023-03-24 12:29:11 -07:00
Sunny Goyal
a5ead45967 Simplifying some page indicator dots attributes so that it can
be easily modularized

> Moving the color configuration to xml
> Moving auto-hide logic to a subclass as it doesn't
  need to be in the main library

Bug: 274011949
Test: Verified on device
Change-Id: Icf7bd5d1cbde3daa9441f2af51f98a931bcd6ee2
2023-03-16 15:57:06 -07:00
Brandon Dayauon
ffc7084b37 Correctly make to spec the color for "Turn on work apps" button and add stroke
- define color in base and quickstep

bug: 267975252
test: Manual - video: lightTheme: https://drive.google.com/file/d/1noY5Grq4jOxFIheL91KB_sOYRwp8XIyD/view?usp=sharing
test: darkTheme: https://drive.google.com/file/d/1o1uaTedAKbPy3BTG1GKJ0ldyHFs0-jGN/view?usp=sharing
Change-Id: I266b6624aa6f045c1f30c0db984fa9e1c5f6fe7e
2023-03-03 15:42:13 -08:00
Federico Baron
e8217b3c1b Add ripple effect when a header in widget picker is selected.
We need to use setSelected in order to add a ripple effect when a header is selected in tablet landscape mode, and to set the style through XML rather than programmatically the way it was done before in the method `setLargeScreenTheme`.

Fix: 268558453
Test: Turn on LARGE_SCREEN_WIDGET_PICKER and verify that when selecting a header there's a ripple effect on that header
Change-Id: I6cab920258a57118430d1e07416508ef36faa56d
2023-02-21 16:33:18 -08:00
Thales Lima
1a2d4bd6f4 Create an XML parser for WorkspaceSpecs
Extract DeviceProfileTest to Launcher3 so it can be used in other tests as well, and change name of previous base test to be more descriptive.

Bug: 241386436
Test: WorkspaceSpecsTest
Change-Id: I64613bb5a23c374ed15fb6d936192236a541ab9b
2023-02-08 11:20:14 +00:00