Commit Graph

580 Commits

Author SHA1 Message Date
fbaron e4b0b71faa Make hotseat column span responsive
Flag: NONE
Test: DeviceProfileDumpTest, DeviceProfileAlternativeDumpTest, HomeScreenImageTest
Bug: 325084912
Change-Id: Ifa9e8066662a1ab053f66b8800b739d813d2dab8
2024-04-16 06:19:16 +00:00
Fengjiang Li 00711e68a5 Merge "Enable predictive back in TAPL tests" into main 2024-03-15 14:52:58 +00:00
Fengjiang Li e90f098d4f Enable predictive back in TAPL tests
With ag/26349940 we have fixed the bug where back swipe is not working

Fix: 326118348
Test: this is the test
Flag: NONE
Change-Id: I7e826f6ba3022a04d016d4a0a2134e287d85e8be
2024-03-15 00:00:37 -07:00
Luca Zuccarini bb937b2556 Merge "Introduce a new Home animation for workspace and the outgoing task." into main 2024-03-14 16:11:46 +00:00
Luca Zuccarini c9cbc9d5a1 Introduce a new Home animation for workspace and the outgoing task.
The values are currently the same for all display and orientation
configurations, but they might change before launch.

There are a couple known imperfections:
* Swiping out of a hotseat app with very low velocity doesn't look
  great
* Sometimes, if the window movement reaches its final location faster
  than the background is done scaling, there is a small snap in icon
  position

Bug: 298089923
Flag: ACONFIG com.android.launcher3.enable_scaling_reveal_home_animation DISABLED
Test: verified with the flag on and off

Change-Id: Id54c7f0a76f62108d8b92a3b5e78634fff64dbef
2024-03-14 10:48:02 +00:00
Brandon Dayauon 68c18236ad Disable two line text legacy flag.
Will now repurpose the twolinetoggle flag to be the flag that will
make twoline text enabled/disabled.

bug: 316027081
Test: presubmit
manually: https://screenshot.googleplex.com/BsZGCm7DrTZLwG4
Flag: com.android.launcher3.enable_twoline_toggle Staging
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
2024-03-08 21:32:22 -08:00
Federico Baron 835b9610bc Merge "Update some dimens for portrait edit state" into main 2024-02-29 17:17:19 +00:00
fbaron 3bb6d4bd81 Update some dimens for portrait edit state
Fix: 324133830
Flag: NONE
Test: HomeScreenEditImageTest
Change-Id: I7f42664b63e6981bcef5db2e76129bd3fe567102
2024-02-27 06:57:55 +00:00
Brandon Dayauon 0fa9113028 Merge "Add home settings toggle featureflag for enablingTwoLineText" into main 2024-02-21 18:14:21 +00:00
Shamali P 5fbb0cccad Use derived padding instead of static 300dp for large portrait displays
In tablet, portrait mode, a padding of 300dp was applied to make it
less elongated, but that doesn't scale well across different devices.

So, we use 1/6th of height as the additional padding. This fixes the
existing logic.

Bug: 318410881
Bug: 315055849
Flag: N/A
Test: Screenshot update in cl chain.
Change-Id: Ia9cfe481131f086b66f625069cbf9a7c0343c2c9
2024-02-15 18:32:21 +00:00
Brandon Dayauon 5787a2710c Add home settings toggle featureflag for enablingTwoLineText
- Have shouldUseTwoLine() be decided with the home settings toggle value

bug:316027081
spec: https://www.figma.com/file/uMzPkNMZpb7EyfHDo8usIa/V-%E2%80%A2-Toast-Butter?type=design&node-id=405-384593&mode=design&t=UBkdeuNlAdRh2FGU-0
Test:
Video: https://drive.google.com/file/d/15VUhNVro2fiwv3SzMda1StiPb3PV1eMT/view?usp=sharing
before searchPreferenceScreen: https://screenshot.googleplex.com/3uqdMsZoGSBYb6c
after searchPreferenceScreen: https://drive.google.com/file/d/15dswiHRTnafyhgQA_tL2tRc7vHFWdHbZ/view?usp=sharing
before homeSettingsPage: https://screenshot.googleplex.com/7wsNevxGun2KCCB
after homeSettingsPage: https://drive.google.com/file/d/15m5bjEyewlNHI_h26aygHa7zrgZ5qDF6/view?usp=sharing
AppListSettingsPage: https://drive.google.com/file/d/15hl4ScHBOLgKv3M38HtatMxQw85pgl7t/view?usp=sharing
Flag: enableTwolineToggle DEVELOPMENT

Change-Id: I3ad133dd51dcb97e14ccded730e7737c5049261a
2024-02-12 09:24:48 -08:00
Uwais Ashraf c2f73d9091 Merge "App chip refactor" into main 2024-02-09 13:43:03 +00:00
Uwais Ashraf 99fdf7a75e App chip refactor
- Adds background outline replacing 2 circles + rect approach. This
enables easier shadow drawing code.
- Simplify structure of AppChipView.
- Adds an anchor View to simplify laying out of menu around app chip

Bug: 313644427
Bug: 317007147
Fix: 322760765
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu TEAMFOOD
Test: OverviewImageTest
Change-Id: I56c2644779863c083ae475a740a84321b1d0c396
2024-02-09 12:09:42 +00:00
fbaron fc6bbcfed2 Align workspace and hotseat icons in landscape
Fix: 311381639
Test: Verified on device
Flag: NONE
Change-Id: I4e2c74f59e8492042c3c7f8eccc98921d92d685f
2024-02-01 01:04:40 +00:00
Shamali P be55f82fab Fix issue that widget picker is only half of screen in foldable.
Apply the extra top padding only if device is in portrait and aspect
 ratio is beyond 1.5 to keep the original intent of avoiding showing
 a single pane widget picker in super elongated form. In b/214215594,
 a top padding was applied for w720, but in fold, it ended up showing
 the picker only half way up. So, changed it to consider aspect ratio.

In b/315055849 the tablet portrait will use full width two pane picker,
and then, it will also not need this extra top padding. In that change,
we will use the flag to guard applying this extra padding.

See screen/cast/NTYwMjU1MzY4NDI5NTY4MHw3NDIxYzU0Mi1lNg

Test: WidgetPickerImageTest and Manual (screencast above)
Bug: 317013493
Flag: N/A
Change-Id: I90e0c416f0f05460960983588edf0068d99cd1a6
2024-01-16 16:04:00 +00:00
Jordan Silva 07af3b06ac Merge "Update responsive grid spec cell size remainderSpace logic" into main 2024-01-09 12:52:10 +00: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
Jordan Silva dd612687cc Step down icon size when isVerticalBarLayout for responsive grids
Fix the icon step down logic to resize the icons to fit when isVerticalBarLayout and the iconSize does not fit inside the cellHeight.

Bug: 316087877
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I3a1fd28b729435eaf2dbbff650e4d13d33d77ff8
2024-01-08 14:09:23 -03:00
Andy Wickham 99d7d4f2cb Better handling of insets for All Apps.
Changes:
 - For tablet, always center All Apps without applying additional
   insets for things like cutouts.
 - For tablet, allow the panel to span the full height of the
   screen (minus system bars), rather than 5.5 app rows. This also
   ensures the panel fully closes even if there are cutouts.
 - Remove additional padding for vertical bar mode (landscape on
   phones). This was double counting the cutout insets, but only
   for some views, so things were not aligned. Now the apps line
   up with the search bar, and the scroll bar still makes room for
   any side insets.

Before and after examples:
https://drive.google.com/drive/folders/1k0vSzisf4ZuGyp-qR-IF0QwM-IcHBFrZ?resourcekey=0-uxjzuVQ1KA3WwOQ4v6Dh2w&usp=drive_link

Bug: 299923399
Bug: 259617884
Fix: 300761324
Test: Manual
Flag: NA
Change-Id: I136d516260a1343b1198693c73fa389fe0e11cc9
2024-01-03 19:21:01 +00:00
fbaron e69b6f49f7 Align QSB with hotseat and workspace icons
The QSB was a bit wider becuase icons visible size is a bit smaller than their actual size due to b/235886078 so we add a workaround to adjust QSB size based on the visible icon size

Bug: 281587788
Test: atest HomeScreenImageTest
Flag: NONE
Change-Id: I593ca2d588f08b830be0b2ac389c747b6f558b91
2023-12-19 13:52:45 -08:00
Charlie Anderson 97eedb9570 Merge "fix font-scaling from clipping folder child icons" into main 2023-12-14 03:30:55 +00:00
Charlie Anderson 7bb10974d7 fix font-scaling from clipping folder child icons
Bug: 310850491
Test: verify locally and through screenshot tests
Flag: N/A

Change-Id: Iea7319e82ddffed16903e5112848cf089e5d52f2
2023-12-11 20:07:44 +00: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
Jordan Silva 3e5688af97 Fix folder icon drawable padding for responsive grid
Bug: 314285621
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I502a112a0c7d1e6ec1de8501efb8d2893436e880
2023-12-05 15:12:29 -03: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
Winson Chung abb4483f6f Merge "Add Launcher support for left-right splits on portrait foldables" into main 2023-11-30 05:52:57 +00:00
Winson Chung 104a4c8b69 Add Launcher support for left-right splits on portrait foldables
Bug: 291018646
Test: Manual
Flag: enable_left_right_split_in_portrait

Change-Id: I92af7ffd83770f7e942c3892a12b1611ff5b50f4
Signed-off-by: Winson Chung <winsonc@google.com>
2023-11-29 20:20:14 +00:00
Jordan Silva 15cacd54c6 Update where responsive grid cell icon size is defined
This CL changes where the cell icon size, text size and drawable padding is defined to prevent an issue with taskbar.
The transient taskbar updates the DeviceProfile icon size with a different value than used for responsive grids, and this update wasn't working anymore because responsive grid implementation wasn't reading the value from iconSize inside the updateIconSize function, but from the responsive grid spec.

Bug: 313463280
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: manual
Test: NexusLauncherImageTests
Change-Id: I835a90d724c2d1b2d32f483b758b789be7cbdcfe
2023-11-28 14:42:06 +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 2e1b287038 Merge "Use DeviceProfile numFolderRows and numFolderColumns" into main 2023-11-24 12:29:19 +00:00
Thales Lima 07c6b8d96d Use DeviceProfile numFolderRows and numFolderColumns
Invariant hold values that are not related to current DP in use. This is a change needed for IDP to hold more values in the future akin to iconSize.

Bug: 309800141
Change-Id: Iefb388a5f6590d7da3452d2c388c02bd5e9d32bb
Flag: N/A
Test: NexusLauncherTests
2023-11-21 11:47:21 +00:00
Jordan Silva 9a3bd8f109 Fix folder label text size not downsizing to match app icon
Fix: 311350985
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: ResponsiveFolderImageTest
Change-Id: I98103749541dd1e120908ac06e24dfc38cc7aa59
2023-11-16 18:34:35 +00:00
Jordan Silva 8b3fa14ef9 Fix wrong number of columns for AllApps calculation
Fix: 310657769
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Change-Id: Id46c9e4529176b68f6d92d31a71016ed4f8134d1
2023-11-14 10:37:32 +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 376036a36e Resize icon and text size for AllApps when it doesn't fit the cell
Bug: 287975993
Fix: 309489796
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: DeviceProfileDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: ResponsiveHomeScreenImageTest
Test: ResponsiveFolderImageTest
Test: ResponsiveAllAppsImageTest
Change-Id: I1dda073b558a7f4540d5fe5c438fa796a70b6ddd
2023-11-08 18:05:59 +00:00
Thales Lima 55fcfacd1a Merge "Center AllApps on the screen" into main 2023-11-08 18:02:16 +00:00
Thales Lima d94993ed9e Merge "Use new icon stepping logic for Folders" into main 2023-11-08 15:50:41 +00:00
Thales Lima a25cd90b5e Center AllApps on the screen
AllApps used workspace paddings which are unbalanced in verticalBar. This changes it to always be centered. In dynamic grid AllApps now uses the whole width for the layout. In responsive grid it keeps the cell width and center the layout.

Note that this is centered on the screen but nothing could be done regarding the camera inset at this time, as it would need a refactor of how AllApps QSB is layout as well.

Bug: 269632571
Test: NexusLauncherTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I326d041bcef211d398d1a5c3210958b689414d49
2023-11-08 14:39:52 +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
Thales Lima e9b5e14a2b Use new icon stepping logic for Folders
Bug: 307694237
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: ResponsiveFolderImageTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: Ifbfb714e48c2e0851ef55ac60cadafbb6358d074
2023-11-04 17:10:13 +00:00
Thales Lima b433c9c312 Change AllApps padding to use a Rect
AllApps uses different values for left and right padding in some places (e.g. ActivityAllAppsContainerView uses workspacePadding.left/right), and this change is the first step into moving those values into DeviceProfile.

Bug: 269632571
Test: NexusLauncherTest
Flag: NONE
Change-Id: I14c4edf55ca74f256b1aaa336fff246a0c78e25d
2023-10-31 16:19:40 +00:00
Uwais Ashraf 6eb006ed90 Merge "Add margins to top and bottom when grid only overview enabled" into main 2023-10-25 13:53:24 +00:00
Uwais Ashraf aa7fa886d6 Add margins to top and bottom when grid only overview enabled
Fix: 299100244
Test: OverviewImageTest and dump tests
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Change-Id: I22ebced5bf1e27974036d6e2ef72d2b8d63df824
2023-10-24 16:15:39 +00:00
Thales Lima bba07729b2 Remove app labels in isVerticalBar
Bug: 296400197
Test: ResponsiveHomeScreenImageTest
Test: ResponsiveAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Ia508c1b909df3fff5768b39e90275bf914b6f1c4
2023-10-24 13:07:22 +00:00
Thales Lima 24ceca6993 Decrease text size if it doesn't fit the cell
Bug: 293467738
Test: ResponsiveHomeScreenImageTest
Test: ResponsiveAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Ic0b2d3cde1d4b8b9089f93b96c9bb386247603ce
2023-10-24 13:07:22 +00:00
Alex Chau c78c53c22a Migrate ENABLE_OVERVIEW_ICON_MENU to aconfig flag
Bug: 257951354
Change-Id: I47b1c1d422ce3c510ea22ea3e1feff0263ded177
2023-10-12 16:00:14 +00:00
Alex Chau 6ae2c4d77d Merge "Revert "Revert "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag""" into main 2023-10-11 15:38:57 +00:00
Alex Chau 4989f4f36d Revert "Revert "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag""
This reverts commit 7b5472f986.

Reason for revert: aconfig/SetFlagsRule actually works with TAPL tests (http://ag/c/platform/packages/apps/Launcher3/+/24991890/comment/8303a3c6_030ae00b/)
Bug: 270397206

Change-Id: I7529a64c3197e4c2b4d5fb1e46fb29bdea1e52e9
2023-10-11 14:08:22 +00:00
Alex Chau 09d8e2ca57 Merge "Revert "Migrate ENABLE_GRID_ONLY_OVERVIEW to aconfig flag"" into main 2023-10-10 12:26:21 +00:00