Commit Graph

547 Commits

Author SHA1 Message Date
Thales Lima
a08a443d63 Make folder sizes customizable
Introduce new attrs for folder sizes and update all grids to use the new attrs

Fix: 214582832
Fix: 236272949
Test: atest DeviceProfileTest
Test: manual comparison with mocks
Change-Id: I638052a7f01b4951df0dd26db577167468a3c46d
2022-08-12 12:24:18 +01:00
Thales Lima
9938c2f791 Calculate hotseat width based on available width
Navigation buttons take space on the hotseat, so hotseat width (qsb width and border space between icons) should be calculated instead of having a coded value.

Bug: 223724516
Bug: 228998463
Test: manual, changing display size
Test: manual, changing hotseatBarEndOffset value
Test: HotseatWidthCalculationTest
Change-Id: Ibd4f5ff2e06afda8e7420fb744db049d2e418e14
2022-08-04 15:21:06 +01:00
TreeHugger Robot
8157be497d Merge "Fixing search behavior in Launcher3" into tm-qpr-dev 2022-07-29 19:48:34 +00:00
Sunny Goyal
af95ddbadc Fixing search behavior in Launcher3
> Showing no-result found only when there are no results
> Removing unnecessary view inflation in RecyclerViewPool for
  various search vide types
> Removing unused market-search link and no-empty-result illustration

Bug: 240343082
Bug: 207573083
Test: Verified Launcher3
Change-Id: Ia44799cd2385ea5dc837ef25732ca237975abde7
2022-07-28 22:05:30 -07:00
Jeremy Sim
1cfe6d490a Update calculation method for Overview UI placement on tablets
This update slightly changes the calculation method for Overview UI placement, in order to line up better with spec. (The previous calculation caused a small 30dp divergence on tablets.)

Bug: 236760307
Test: Manual by measuring pixels and comparing to spec
Change-Id: I94e9e7b5a6a24c37693425ac8ec71cd066003658
2022-07-28 14:05:24 -07:00
TreeHugger Robot
5e6fe32818 Merge "Space out 3 button nav on taskbar" into tm-qpr-dev 2022-07-26 16:32:06 +00:00
Alex Chau
66bac181ac Merge "Revert "Move BaseActivityInterface task size methods to DevicePr..."" into tm-qpr-dev 2022-07-26 09:36:18 +00:00
Vinit Nayak
c7293179d0 Space out 3 button nav on taskbar
* Add additional margin on nav buttons if
there's overlap w/ contextual button
* End spacing is dependent on grid layout

Bug: 223724516
Test: Tested on unfolded with different
grid sizes.

Change-Id: Ie814f35cd1f35629744050ee3f7242c5a8599883
2022-07-25 13:15:11 -07:00
Alex Chau
62572c04e2 Revert "Move BaseActivityInterface task size methods to DevicePr..."
Revert "Move BaseActivityInterface task size methods to DevicePr..."

Revert submission 19279487-baseactivityinterface

Reason for revert: As per discussion in ag/19341332, make sure DeviceProfile can properly react to inset changes before moving task size calculations there
Reverted Changes:
I30324d34c:Move BaseActivityInterface task size methods to De...
Ia9c1d0387:Move BaseActivityInterface task size methods to De...

Bug: 238593212
Change-Id: I0d40fdd4a5d4468494e30cef32a284479ddd2feb
2022-07-25 18:38:03 +00:00
Alex Chau
69a83d0d00 Merge "Use collapse handle area height to calculate QSB margin on tablet" into tm-qpr-dev 2022-07-19 16:14:03 +00:00
Pat Manning
4e73e5e352 Move BaseActivityInterface task size methods to DeviceProfile.
Fix: 238593212
Test: DeviceProfilePhoneTest.kt
Test: DeviceProfileVerticalBarTest.kt
Test: DeviceProfilePhone3ButtonTest.kt
Test: DeviceProfileVerticalBar3ButtonTest.kt
Test: DeviceProfileTabletLandscapeTest.kt
Test: DeviceProfileTabletPortraitTest.kt
Test: DeviceProfileTabletLandscape3ButtonTest.kt
Test: DeviceProfileTabletPortrait3ButtonTest.kt
Test: DeviceProfileTwoPanelLandscapeTest.kt
Test: DeviceProfileTwoPanelPortraitTest.kt
Test: DeviceProfileTwoPanelLandscape3ButtonTest.kt
Test: DeviceProfileTwoPanelPortrait3ButtonTest.kt
Change-Id: I30324d34ca119a467f530b590949743c2ba7b91a
2022-07-18 16:35:02 +01:00
Alex Chau
ded0aa126d Use collapse handle area height to calculate QSB margin on tablet
Fix: 228324815
Test: Check AllApps on different size tablets
Change-Id: Ia7064c21dd1810051e93eedee36bc14f125d8352
2022-07-15 10:57:53 +01:00
Pat Manning
26f70f777e Add DeviceProfile tests on all attributes across different configurations.
Fix: 237542518
Test: DeviceProfilePhoneTest.kt
Test: DeviceProfileVerticalBarTest.kt
Test: DeviceProfilePhone3ButtonTest.kt
Test: DeviceProfileVerticalBar3ButtonTest.kt
Test: DeviceProfileTabletLandscapeTest.kt
Test: DeviceProfileTabletPortraitTest.kt
Test: DeviceProfileTabletLandscape3ButtonTest.kt
Test: DeviceProfileTabletPortrait3ButtonTest.kt
Test: DeviceProfileTwoPanelLandscapeTest.kt
Test: DeviceProfileTwoPanelPortraitTest.kt
Test: DeviceProfileTwoPanelLandscape3ButtonTest.kt
Test: DeviceProfileTwoPanelPortrait3ButtonTest.kt
Change-Id: I1596dcd1fb8c9b353cdfcab224d7670d88bed716
2022-07-12 14:17:18 +01:00
Alex Chau
0c4e11b479 Make workspace and hotseat scale down in widgets picker
- Also centralized workspace content scale percentage to DeviceProfile

Test: manual
Fix: 231699666
Change-Id: I3f8dcb9921e0cd93ad391d51120b189005ad07df
2022-07-08 19:03:48 +01:00
Thales Lima
b8c0595d42 Add new hotseat bottom margin options
This changes how the hotseat height is calculated and by consequence how spaces are distributed in the workspace as well. This is the first of a series of changes that will improve and streamline workspace calculations.

Bug: 228998463
Fix: 234023782
Fix: 230191631
Fix: 232914299
Fix: 236238226
Test: manual, HSV and comparing to mocks
Change-Id: If021e8ba2c7c24c0bf9f27a1aa7aa946792ed04f
2022-07-05 15:33:47 +01:00
Alex Chau
6329b20f43 Merge "Center drop target button alignment across devices" into tm-dev am: 179c289a6c am: 7ca1b38d7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18580267

Change-Id: I57dd855387257a8704f8529f14ea176562e63549
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 13:24:02 +00:00
Alex Chau
5b0193026a Center drop target button alignment across devices
- Partial re-land of http://ag/18520765

Fix: 229789612
Fix: 231711806
Test: manual
Change-Id: I0630c19901435a30379596378e9c0cd4beb2e764
2022-05-24 18:31:57 +01:00
Jeremy Sim
b0cce86385 Implement non-disappearing View for split staging instructions
The instructions for how to perform a splitscreen operation, previously conveyed through a disappearing Toast, are now conveyed through a custom View object.

Fixes: 219987907
Test: Manual
Change-Id: Iff2bb6e334e0325e8a091d76a5f9b8767071365f
2022-05-23 21:23:22 +00:00
Alex Chau
906d882f91 Update drop target button alignment across devices
- Partial re-land of http://ag/18520765
- Layout the buttons from center of screen for two panels, or from center of workspace for all other cases

Bug: 229789612
Fix: 231706480
Fix: 232063941
Fix: 232283628
Test: manual
Change-Id: Icbc9e2a19140ce3127d5dfe9f798a8ada336cea8
2022-05-23 15:08:52 +00:00
Pat Manning
b29dabce18 Revert "Update drop target button alignment across devices."
This reverts commit 27bfcaa651.

Reason for revert: b/232636570

Bug: 229789612
Bug: 231711806
Bug: 231706480
Bug: 232063941
Bug: 232283628
Change-Id: Ic83515173f4a64228a80f63d75db938243cbf625
2022-05-20 18:20:26 +00:00
Hyunyoung Song
8536fb78c7 Merge "App row padding is now consistent for all grid sizes. Also fix when 2x2 allApp icons get super big." into tm-dev 2022-05-15 06:08:18 +00:00
Brandon Dayauon
07ca884eea App row padding is now consistent for all grid sizes. Also fix when 2x2 allApp icons get super big.
Added consistent padding to each app row.

Bug: 229789736
Bug: 229791507
Bug: 228320417
Bug: 230870213
Test: Manual on Raven

Change-Id: Ice1c8be361f009994a8e0960a30da04fc1c0c218
2022-05-13 17:10:15 -07:00
Alex Chau
8a7617f168 Merge "Fix slow page animations on large devices" into tm-dev 2022-05-12 19:08:41 +00:00
Pat Manning
27bfcaa651 Update drop target button alignment across devices.
Fix: 229789612
Fix: 231711806
Fix: 231706480
Fix: 232063941
Fix: 232283628
Test: manual.
Change-Id: I75d649b953ad1607dbba87a8f758884ff938b6dc
2022-05-12 13:49:58 +00:00
Andras Kloczl
c2bd15fd2a Fix slow page animations on large devices
- Change non-fling page snap animation duration
- Change fling gesture related minVelocity

Test: Scroll between home pages, allapps, folder pages
Bug: 229073876
Change-Id: Ib39187ec9c832e65dd0b71f8f4a00e1b636423a4
Merge "Hide web settings, if web suggestions is disabled" into tm-dev

Change-Id: Ib39187ec9c832e65dd0b71f8f4a00e1b636423a4
2022-05-12 12:56:41 +01:00
Luca Zuccarini
e75b1c8a19 Merge "Update the NORMAL->ALL_APPS transition when tapping on QSB on phones." into tm-dev 2022-05-10 22:35:02 +00:00
Brandon Dayauon
e5142c5c53 changed name and dimensions of work_mode_toggle button, changed outline to surface for the (x) icon..
Fixed padding issue (tightness) between Personal/WorkTabs/EduDialog
Aligned Work Toggle button to be the same with the workTabs/eduCard
raised button up 20dp to align with specs

Fixed issue where allApps apps invade the tabs. Fixed RTL issues where it wasn't going RTL.
Fixed RTL issue for the workfab button where there was no margin on the left side of the button
Added DeviceProfile to constructor

Bug: 200810328
Bug: 224731300
Test:
	Before: https://screenshot.googleplex.com/6sRgNZQz4wKYn5n
	After: https://screenshot.googleplex.com/8hBLyDiMbMH9tn2
	After(showingLayoutBounds): https://screenshot.googleplex.com/MuVUXCegukAMzSr

Change-Id: Ibac3f5b8fe7d877c2f54a2c87f4393c1a91dc806
2022-05-06 09:52:05 -07:00
Luca Zuccarini
ef006c7603 Update the NORMAL->ALL_APPS transition when tapping on QSB on phones.
- New interpolators
- New duration
- Removed workspace translation
- Removed overlapping fades -- are now sequential

See video in the bug.

Bug: 227745955
Test: manual
Change-Id: I19fa19a3806e963a04c5e694a52d3c1b921cf51f
2022-05-06 16:07:17 +00:00
Alex Chau
a2fc764405 Update overview actions alignment
- Align overview actions to the top with a defined margin below task thumbnail, except for vertical bar layout
- In modal state, use task view's bottom as pivot, and expand using all the space about pivot
- Simplified overview actions margin calculation and moved some logic to DeviceProfile

Bug: 209981696
Test: manual on various devices
Change-Id: I4c96cb02c6f3d6adf30633ddeb883bc4eec16f36
2022-04-25 19:20:21 +01:00
Thales Lima
7bb79ae8e2 Tune menu size
Fix: 223351193
Bug: 214586519
Test: check sizes with HSV and Window
Change-Id: I2fa8d03eb80e952ebc238e6f4db5563f774128cd
2022-04-13 14:21:36 +01:00
Pat Manning
4349d21246 Merge "Adjust grid cell visualizations." into tm-dev 2022-04-12 11:50:38 +00:00
Luca Zuccarini
45c43c7058 Merge "[Toast] Polish the layout of the QSB, tabs and header protection." into tm-dev 2022-04-08 17:21:32 +00:00
Luca Zuccarini
a5e95419f5 [Toast] Polish the layout of the QSB, tabs and header protection.
Specs and screenshot in the bug.

Fixes: b/227902759
Test: manual
Change-Id: Ia713c923a71207cfaab7068f20c8606d816f8b43
2022-04-07 16:53:53 +00:00
Sebastian Franco
d2d8e97a65 Make the text for the drop target buttons fit if it's too long.
The text "Don't suggest app" is too long when the device language
is GE or JA, or if you make the text bigger in settings.

Before truncating the text completely we are going to try to make
the text smaller until it gets to a predefined value
(button_drop_target_min_text_size).

Test: Change the language to German (Deutch) and install a new app and drag it to the workspace to see the button "App nicht vorschlagen"
Test: Also, a nice way to test is to go to SecondaryDropTarget#setupUi and hardcode the option to always show "Don't suggest app"
Fix: 221480721
Change-Id: I99def4e23cd17109a297aecaa620cef7a0d137e7
2022-04-07 16:39:29 +00:00
Brandon Dayauon
e3589debfd Merge "Change work_app_edu to be like T spec: https://screenshot.googleplex.com/43ThiCnqrAqAQgE" into tm-dev 2022-04-06 20:41:24 +00:00
Pat Manning
08610ca583 Adjust workspace grid and cellLayout paddings.
This is a partial revert of ag/17540098

Bug: 202971709
Test: manual
Change-Id: Ia49e48f336bcca906aae6b014d88f10421b83d0c
2022-04-06 13:10:50 +01:00
Pat Manning
52307a4604 Adjust grid cell visualizations.
This is a partial revert of ag/17540098

Bug: 202971709
Test: manual
Change-Id: Ia6f863701c169709053980766337b3caae6fba76
2022-04-06 13:07:08 +01:00
Pat Manning
de25c0db36 Adjust edit state drop targets and workspace scaling per device type and orientation.
This is a partial revert of ag/17540098

Bug: 202971709
Test: manual
Change-Id: I0a642f932afd75e47ce11a2c1ee94643d1a67e0c
2022-04-05 20:56:03 +00:00
Brandon Dayauon
d20011be15 Change work_app_edu to be like T spec: https://screenshot.googleplex.com/43ThiCnqrAqAQgE
Fixed the button to show on Portrait mode..streamline added for work_mode_fab.
Took out unneccessary attributes such as textColor for the button and took out background.

How it looks in landscape: https://screenshot.googleplex.com/AVaUEztqsXYA28N
How it looks in portrait: https://screenshot.googleplex.com/3oTG3j7yZLCxkLz
Apk: https://drive.google.com/file/d/1qLeiJSF3lHf7tZzoHWwBHGxDgbveTIYX/view?usp=sharing

Test: Manual - Tested on local Pixel device (Raven)
Bug: 224731116
Bug: 224731300
Change-Id: If1392806adecf1ce02723d20686ca6bf524f6464
2022-04-05 11:50:18 -07:00
Pat Manning
5575dfeaad Merge "Revert "Adjust edit state drop targets, workspace scaling, and m..."" into tm-dev 2022-04-01 02:05:41 +00:00
Luca Zuccarini
0c3961c367 Refactor the floating header's positioning.
Maintains the existing behavior while simplifying the overall layout.

See go/all-apps-qsb-positioning for details.

Bug: 221418522
Test: manual
Change-Id: I25a737cdfa431e8eb3a00b639984caed70819252
2022-03-29 10:18:33 +00:00
Pat Manning
e372366bb3 Revert "Adjust edit state drop targets, workspace scaling, and m..."
Test: manual

Revert submission 17004675-edit-state

Reason for revert: b/226274309
Reverted Changes:
Ib50509b6f:Adjust edit state drop targets per device type and...
Id1817cd3c:Adjust edit state drop targets, workspace scaling,...

Change-Id: I22863d7735f49f6a040a17cf56cc66f20a3e0986
2022-03-28 08:24:54 -04:00
Tracy Zhou
8d06bb8991 Merge "Update initial staged split UX." into tm-dev 2022-03-22 22:44:33 +00:00
Tracy Zhou
4ff3615b23 Update initial staged split UX.
- Introduce inset to the staged split view
- Update width of the staged split view
- Introduce rounded corners to staged split view. It's tricky to animate it in with smooth transition considering the rounded corners. The best way to handle it is to draw content as if part of it is off the screen, so that when it's animated in, the rounded corners can slide in onto the screen correctly.

Fixes: 219085340
Test: https://recall.googleplex.com/projects/f46cfe9c-8076-4efe-bf8a-b1cc4f1f5e1b/sessions/09a99b75-3614-4d20-b6d4-a78108f769d8

Change-Id: I24d90cc9e2695d822cb2de8b21e2d5519f2e344d
2022-03-21 21:21:42 -07:00
Pat Manning
1acf2b18af Adjust edit state drop targets, workspace scaling, and margins per device type and orientation.
Bug: 202971709
Test: manual
Change-Id: Id1817cd3c7e7bfa5b0aa8aa20565b791ad871f64
2022-03-18 17:43:28 +00:00
Andras Kloczl
142b054e06 Tune widget picker bottom sheet VisD for large screen
Test: Open widget picker by long pressing the home screen.
Open app specific widget picker by long pressing an app icon
that has widgets. Try both landscape and portrait, also on
phone/tablet/foldable.
Bug: 214215594

Change-Id: I7b4b3a8d7421f1d4df84d49a18b465693a17bd7b
2022-03-15 14:01:59 +00:00
Alex Chau
19c6eca5c5 Use overview_actions_height from Resources to calculate OverviewActionsView alignment
- startActionView.getHeight() isn't ready when updatePaddingAndTranslations is called, so use overview_actions_height from Resources through DeviceProfile instead.

Fix: 218442870
Test: Restart launcher, go to overveiw from app, rotate and rotate back, overview actions stays in same position
Change-Id: Ia5e234f73100a2f418c17222145a8f993cbfab8a
2022-03-10 20:16:59 +00:00
Alex Chau
b8c22e1155 Tune AllApps bottom sheet VisD and motion
- Make AllApps bottom sheet solid and appears from bottom
- Teleport AllApps bottom sheet as user drag to reduce drag range
  - Consider teleport interpolation for state transition sdetection
- Tuned workspace motions for AllApps bottom sheet (no translate, shrink)
- Add portrait vertical translate for tablet portrait including taskbar AllApps
- Updated bottom sheet handle and created common variables for other bottom sheets

Bug: 208599118
Test: manual on tablet AllApps, taskbar Allapps and handheld AllApps
Change-Id: I69dba5f155914cd012cc8ef3be1ef71fb2be5a40
2022-02-23 17:08:06 +00:00
Alex Chau
6a7d1e2ad1 Don't apply nav bar insets in tablets
- With flexible inset changes in T, taskbar is no longer inseted in getCurrentSizeRange, i.e. DeviceProfile.availableHeight no longer inset nav bar size
- In order for home screen sizes to be calcualted correctly, avoid inseting nav bar in LauncherRootView
- Only apply a bottom padding with stashed taskbar size to necessarily surfaces (Overview)
- Home screen icon overlap will be fixed in separate CL

Bug: 215528237
Test: maual in tablet gesture nav and 3 buttons
Change-Id: I9bc796ba059159e819f8cd121ddabab96c8113d2
2022-02-01 13:08:49 +00:00
Alex Chau
635b3abcf1 Remove ENABLE_OVERVIEW_GRID feature flag
- Use isTablet directly instead of overviewShowAsGrid
- Tablet/landscape resoruces can now be overriden via xml
- Use Landscape resources in tablet in additional to vertical bar layout
  - For resources overwritten in values-land that was intended for vertical bar layout, override them in sw600dp for tablet landscape

Bug: 210597891
Test: manual
Change-Id: I19eac935a5fb1a420485408aa8b4774632726af1
2022-01-27 11:28:35 +00:00