Commit Graph

967 Commits

Author SHA1 Message Date
Anushree Ganjam
45ec83b2d6 Refactor all_apps.xml contents to all_apps_content.xml
We can reuse the all_apps_content.xml in other all_apps.xml
This is step1. As step2, I will refactor secondary_launcher.xml
and taskbar_all_apps.xml.

Bug: 204781396
Test: Manual

Change-Id: Ia842ca082ec38220d327f512221807ed21ad2ad3
2022-11-29 02:09:29 +00:00
Thales Lima
b35faed6e7 Improve spaces for folders
Bug: 214582832
Test: DeviceProfileTest
Change-Id: I7c5cae0792d51baf111d0aec46be302ac6ca9994
2022-11-07 18:23:48 +00:00
TreeHugger Robot
2022681cc2 Merge "Change padding of widget recommendation table for correct size" into tm-qpr-dev 2022-11-01 09:43:37 +00:00
Federico Baron
41235d529b Merge changes I03636e28,I6cf6d52e into tm-qpr-dev
* changes:
  Fix page indicator dots height in workspace
  Change delightful pagination flag and use it for workspace
2022-10-19 19:33:18 +00:00
Federico Baron
c722e7d814 Fix bug where pagination animation comes in from outside the folder when opening folder after swiping back home from another app (left to right swipe)
Fix: 249814494
Test: Manual
Change-Id: I03008dd24ddb9a0ba4c5a44878cbdf04c65de435
2022-10-12 15:42:34 -07:00
Sihua Ma
3559740ea0 Change padding of widget recommendation table for correct size
Previously, the margin of the recommendation table was changed to fix the bug b/209579563 , but this leaves a bug where the left/right sides of the recommendation table would be too close to the screen border. This CL should leave enough space for both sides and reveal the scroll bar again, while keeping the talkback focused on the title first once it enters the widget picker.

Test: Manual
Bug: 206481237
Change-Id: I808c279c3264a51b21a0bb7af8ca455d284e36ff
2022-10-05 13:50:14 -07:00
Federico Baron
7539d7649c Change delightful pagination flag and use it for workspace
Before the flag name would only fit 'delightful pagination' for folders, but now we're adding that feature to workspace also, hence the flag rename.
The flag is now also used in launcher to show the new XML file that uses PageIndicatorDots rather than WorkspacePageIndicator

Bug: 249773534
Test: manual
Change-Id: I6cf6d52e76ad1ec60ecb54c5cca204e9ac35cc39
2022-10-05 09:31:43 -07:00
Andy Wickham
369c6e8be7 Reduces vertical padding of predicted apps in All Apps.
Rather than using the full allAppsCellHeight, manually construct
the icon + padding + text and add custom padding (8dp).

Screenshots: https://drive.google.com/drive/folders/1hgEE72PaTj60SxgfPUzQ8hGwnCOWx-Lp?resourcekey=0-TgrHKITyzIXmNAAMYpA_MA&usp=sharing

Fix: 242915342
Test: Manual inspection
Change-Id: Ic566e0f7ea7cf486054bb8fe2429ee5c53e8b174
2022-09-12 18:34:14 -07:00
Andy Wickham
94d5d3cb6c Support for animating A-Z <-> Search.
Demo videos (1/5 speed) and APK: https://drive.google.com/drive/folders/1qQNzcoibiFMzxYhvXc7UEHCaBhJg6SjN?resourcekey=0-OWD06iLXg3wf_eWce4rUPA&usp=sharing

Bug: 234882587
Bug: 243688989
Test: Manually tested a bunch of cases at 1/10 animation speed.
Such as work profile or not, suggested apps enabled/disabled,
typing during the animation, going back during the animation,
web results injected above apps, etc.

Change-Id: Id4f1a858d387bf3a7f9cf2d23564a276544abef1
2022-09-09 15:37:57 -07:00
Federico Baron
8cb0383efb Merge "Fix pagination broken when opening folder after restart bug." into tm-qpr-dev 2022-09-08 17:07:50 +00:00
Federico Baron
e796a6816a Fix pagination broken when opening folder after restart bug.
The alpha wasn't initialized properly so the footer would show up before it was expected to. Alpha is now initalized in the XML file so that the footer starts to appear only once the animation begins.

Test: Manual
Fix: 233690408
Change-Id: I9e08547401cb37ce2f9e711fc4ba000250c49c2e
2022-09-07 20:05:03 +00:00
Mateusz Cicheński
f6b782344c Merge "Replace shelf height with keep clear areas registration in Launcher." into tm-qpr-dev 2022-09-02 05:19:13 +00:00
TreeHugger Robot
bcbba897fc Merge "Add app predictions to secondary display app drawer & fix tab UI." into tm-qpr-dev 2022-08-31 00:01:21 +00:00
Sukesh Ram
1b4869fcbc Add app predictions to secondary display app drawer & fix tab UI.
Bug: 233926067
Test: Manual
Change-Id: I2f45a4b30964b365bf149e8864a3af2ea909a237
(cherry picked from commit 9e5fe63a22)
Merged-In: I2f45a4b30964b365bf149e8864a3af2ea909a237
2022-08-30 22:30:03 +00:00
Sukesh Ram
924852fec5 Made popupContainer's shadow & arrow visible in secondary display
Reduced elevation of app drawer to 0dp because it was conflicting with popup container elevation

Test: Manual
Change-Id: I222866ddfc44ebf9ecd9787bb448e502339a1688
Fix: 233932585
(cherry picked from commit 354fe14cd4)
2022-08-30 20:27:33 +00:00
Sukesh Ram
bf520a5935 Added margin of size 24dp above search bar on secondary display
Test: Manual
Change-Id: I5debc810385eced54aaed436489b16f36367194c
(cherry picked from commit 958dcd2f4f)
Bug: 244224274
2022-08-29 22:24:59 +00:00
Alex Chau
20eb0e3f67 Replace shelf height with keep clear areas registration in Launcher.
This affects Hotseat only for now. Taskbar will be occluded when unstashed.

When in gesture nav and with auto-enter pip, we need to pre-register the Hotseat
keep clear areas, as otherwise the event appears after the animator is started
and current logic doesn't allow to update those destination bounds in the animator.

Test: manually, existing tests pass
Bug: 183746978

Change-Id: I4d97ca77225d3502acac1fb6b5e3eff3e81285ed
2022-08-25 22:52:17 +00:00
hyunyoungs
7d63654691 Remove autofill from launcher edittext boxes
Bug: 214482595
Test: notifyEnterOrExitForAutoFillIfNeeded not called
Change-Id: I2a988b36d1f06036cb68255bb98aab13bb6d8b73
2022-08-23 11:03:04 -07:00
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
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
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
Sunny Goyal
eb966492f7 Merge "Generalizing the PredicitonScroll view so that in can be used in all-apps" into tm-qpr-dev 2022-07-12 21:33:17 +00:00
Brandon Dayauon
ed46b45910 Merge "Add ripple effect to work toggle button and "turn on work apps" button" into tm-qpr-dev 2022-07-08 14:55:07 +00:00
Brandon Dayauon
96f0bc582d Add ripple effect to work toggle button and "turn on work apps" button
Created new drawable xml specifically for the turn on work apps button because
the dismiss button (x) icon on the EDU card shares this drawable. This way I don't
cause collateral damage for the (x) icon dismiss button.

Changed shape -> ripple in work_apps_toggle background

bug: 229385255
test: Manually on oriole and video in bug thread
Change-Id: Id01bfb04c07a724687b0322339b12c8fc9130dfa
2022-07-07 10:14:07 -07:00
Sunny Goyal
9b458a0012 Generalizing the PredicitonScroll view so that in can be used in all-apps
Bug: 234008165
Test: Verified no-functionality-change on device
Change-Id: Ie17d58148b9bdcb08847beb24114b0494437b30e
2022-07-06 12:29:01 -07:00
Sunny Goyal
4827a7d5a9 Fixing widget accessibility node order
Making sure that that search and prediction bar are on top of
RecyclerView/PagedView. This is determined by the widget of the
drawn width of the views if their top matches

Bug: 209579563
Test: Verified that the tite is focused first when opening widgets
Change-Id: Ib800b3743ece915ac4894029462d5776d389ff3f
2022-06-29 11:32:36 -07:00
Sunny Goyal
ed681548fc Moving widget padding to drawable instead of using itemDecorator
ItemDecorator uses item position which is not stable during animations.
Moving it to the background allows the padding to be stable

Bug: 236961658
Test: Verified that the app doesn't crash.
Change-Id: Ied12077de4097e827c5c4157f5196346a301f185
2022-06-23 14:37:17 -07:00
Andy Wickham
5a476da75c Fixes Search bar padding when work profile not present.
The full padding was accounted for between the search bar and the
work/personal tabs, but only part of it was there when the tabs
were not shown.

Screenshot: https://screenshot.googleplex.com/8axV9QQ5Qy8MaUn.png

Test: Manually with and without work profile added. In the latter
case, nothing changed. The screenshot reflects the former case.
Fix: 233010483

Change-Id: I11b3c8cc814be48c25cbd9f454c3e122fff96fa0
2022-06-08 13:32:41 -07:00
Andy Wickham
4ca247a6bb Merge "Moves Search results into a separate RV (take 2)." into tm-dev 2022-05-26 21:41:55 +00:00
TreeHugger Robot
c907fd0a17 Merge "Allows work apps to be dragged down while work edu is showing." into tm-dev 2022-05-26 00:06:08 +00:00
Andy Wickham
ff3721fe96 Allows work apps to be dragged down while work edu is showing.
Also fixes jumpiness of the personal/work tabs while scrolling
with this card showing.

Cause: AllAppsRecyclerView#getCurrentScrollY() calculates the
current scroll based on the top of the first item in the view.
This is used to determine if pulling down should move the
container (if you are scrolled to the top), and it is also used
to align the personal/work tabs as you scroll down (they stop
moving when the top item reaches their bottom).

Fix: The top of the Work Edu card was lower than the top of the
recycler view because it was offset by a top margin. Switching
this to padding in the card's container fixes the associated
calculations while keeping the visual positioning from before.

Fix: 233836148
Test: Manually tried dragging down and scrolling. Tried it with
and without my refactor.

Change-Id: Idaf4b3801174c1dfeceda5c0f112e405908e856d
2022-05-25 14:55:39 -07:00
Andy Wickham
2ba7797edb Moves Search results into a separate RV (take 2).
Bug: 206905515
Test: Manually verified b/230648542 did not resurface. Tested
on phone and tablet with and without work profile.

Change-Id: If724f635286b9dff2c64255f9ece3568a5cb4ea9
2022-05-24 17:10:24 -07:00
Brandon Dayauon
dee5fc561f Label is no longer Unlabeled. Now says "closed"
Bug: 230624621
Test: Manual
Change-Id: I1fbdffdcaf36aaebff89bb5f4a608d5c2dc94502
2022-05-18 15:39:35 -07:00
Sunny Goyal
f27d6c0dc7 Merge "Preventing widget preview from getting accessibility focus on internal content" into tm-dev 2022-05-06 22:15:04 +00:00
Sunny Goyal
d4cb76ebf0 Preventing widget preview from getting accessibility focus on internal content
Bug: 209579561
Bug: 209579521
Bug: 209579162
Test: Manual
Change-Id: If65a74acf021b19438cdc37b07ac508985f8909a
2022-05-06 11:10:41 -07: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
Anushree Ganjam
5cc7ff0990 Revert "Refactors Search results into separate RV for Toast."
This reverts commit 6729f0b950.

Reason for revert: This change caused b/230648542.

Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.

Bug: 206905515
Bug: 230648542

Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
2022-04-28 01:37:49 +00:00
Andy Wickham
6729f0b950 Refactors Search results into separate RV for Toast.
This will help enable transitions between A-Z apps lists and
search results because both can be seen simultaneously and
manipulated independently.

Some high level items of the refactor:
 - SearchRecyclerView is added; logic that populated the main
   (personal) tab with search results was simply redirected to
   this RV instead.
 - BaseAllAppsContainerView added isSearching() method. Returns
   false, and ActivityAllAppsContainerView overrides (as search
   is handled there).
 - Renamed BaseRecyclerView to FastScrollRecyclerView to better
   describe what it does. SearchRecyclerView extends this, but
   returns false for supportsFastScrolling().
 - AlphabeticalAppsList#mAllAppsStore is now optional, so the
   Search RV doesn't need to store/listen to apps. Note this
   doesn't affect the predicted app row which is still updated
   if one of the predicted apps is uninstalled (I tested this).

Future work:
 - Determine why dispatchRestoreInstanceState is not called for
   BaseAllAppsContainerView. Save is called, e.g. on rotation.
   Effect of restore not called: rotating while searching goes
   back to A-Z list.
 - Keep suggested apps in Header while searching. Currently they
   are rendered in the SearchRV above search results, as before.
 - Potentially extract Personal/Work tabs to move independently of
   header.
 - AlphabeticalAppsList is a misleading name because it can also
   contains search results. However, things are pretty intertwined
   between that and BaseAllAppsAdapter (effectively a circular
   dependency), so I figured cleaning all that up was out of the
   immediate scope of this refactor, which is mainly meant to
   unblock transition work.

Bug: 206905515
Test: Manually checked for regressions, ran tests.
Change-Id: I4d3757c8a8f9b774956ca6be541dd4fcdad1de13
2022-04-24 17:36:48 -07:00
Zak Cohen
1dc4dea6ae Bring Widget Picker message style inline with All Apps message style.
Bug: 188227318
Test: Local flash with TestDPC to test message.
Change-Id: I63403f1472a582a63299e647604eaea25b50b8e7
2022-04-21 10:53:17 -07: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
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
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
Sihua Ma
59cfcd0946 Updating font to Google Sans for widget dialog when work profile is paused
Changing the font family of no_widgets_text to Google Sans.

Test: Manual
Fix: 226612140
Change-Id: I70d98c9571aa3a62bb61685b10ae46530630bf97
2022-03-30 00:23:44 +00:00
Tracy Zhou
26f5393db3 Improve the staged split animation
- Introduce rounded corners (since we scale x and y differently, we can't use outline since it doesn't support rx and ry. It's achieved by custom drawing).
- Make sure the thumbnail content doesn't shift during the transition (we use custom cropping for TaskThumbnailView, and we have to do it accordingly here)

TODO: update UX of the initial split view (b/219085340)

Fixes: 194414938
Test: https://recall.googleplex.com/projects/f46cfe9c-8076-4efe-bf8a-b1cc4f1f5e1b/sessions/64953aa7-62ea-427c-8ec0-5f2bd96e4762
Change-Id: Id9a5d2f0f41cb4d619c8b3bd3a83c633e3d1f2de
2022-02-28 21:12:16 -08: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
fb54cf54e3 Avoid AllApps bottom sheet from being and add collapse handle
- Instead of using top margin, use top padding instead
- Add a separate LinearView for the bottom sheet background
- Added a handle to bottom sheet background that handle touches

Bug: 208599118
Test: phone, tablet and taskbar
Change-Id: Id8d3cb5ee6c58193926e2cf5ea7b0cb2280098be
2022-02-10 20:03:56 +00:00
Andy Wickham
cf462e879a Adds ENABLE_FLOATING_SEARCH_BOX flag for All Apps.
This defines how the All Apps screen should be laid out without
anchoring to the search bar at the top, as follows:
 - Header view aligns to the top instead of below search bar.
 - Same for A-Z list.
 - Scroller is aligned to the header view to receive the above
   adjustments automatically.
 - A-Z list is set above search bar to not peek from below.
 - Search bar is set to align parent bottom and translates up
   with the keyboard.
 - Button to disable work apps is raised above the search bar.

Bug: 213954333
Test: Manually with flag enabled/disabled, Always show keyboard
enabled/disabled, and work profile enabled/disabled.

Change-Id: If90bb39a890029fa7056367fe62bad0677f0b86e
2022-02-03 17:12:22 -08:00
Brian Isganitis
1664c9f418 Refactor all apps to depend on activity context.
The current AllAppsContainerView has been split into a base class and a
subclass for activities. The base class allows using all apps with an
activity context. A-Z and work profile tabs are supported, but search
and the hotseat still require an Activity.

Test: Manual. All apps should work the same.
Bug: 204696617
Change-Id: I3b146714bc11b3b3555d97623aab5d78ac836482
2022-01-24 20:24:20 -05:00
TreeHugger Robot
4077d5a326 Merge "Reset split selection state when RecentsView resets" into sc-v2-dev am: 84b64d7910 am: 6b818deec1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16299751

Change-Id: I38d14c7e1b2d63a91dfba495d769e74067966720
2021-11-19 00:17:12 +00:00