Updates add button behavior to go to NORMAL state before adding the
widget to the workspace. This has the effect of dismissing the All Apps
view if it is open.
This fixes an issue where the add button did not work if used from the
WidgetsBottomSheet while All Apps is open, particularly if a new screen
had to be created. See screencasts in gerrit for before/after.
Bug: 335906123
Test: manual, add widget with button from all apps > bottom sheet while
there is no space on the launcher
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: I2fd961c09c473045088feba5d572c26a812e6619
Reselects the WidgetCell that was selected when reloading the sheet on
rotation. WidgetsFullSheet is excluded because it does not retain the
open header on rotation.
Bug: 331429554
Test: manual, see screencast
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: Id3d21f44b1dc525e144296f513f5a460fc51474c
This change removes the widget education tip dialog, and the arrow
tip view. These are no longer needed now that taps are handled by
showing an add button.
Bug: 335318980
Test: `pm clear com.google.android.apps.nexuslauncher` and open widget
picker
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: I9b24a41604880f5f94939c02b94f1a9f6a6c83d5
* Per UX discussion with jane and david, the full width looks too large
for the app info -> long press -> widgets bottom sheet.
* Earlier during POR, we decided to match them all, but after trying it out, we think smaller is better for the app specific bottom sheet.
* http://screencast/cast/NTg1Njk1MDUxOTU5NTAwOHxiMDU0YWJhMi04MQ
* http://screencast/cast/NjU0NjQyODgwMDI3MDMzNnw4NDNhMGVjMy0yMg
Bug: 328812171
Test: screencast
Flag: N/A
Change-Id: I9b0a996f80bac2639bcadf85480468ac886c7093
Updates BaseWidgetSheet to check if the last recorded widget cell
to show an add button is still showing an add button before deciding
how to handle the current click.
When a widget is recycled or loses focus, it will reset to the default
state of hiding the add button. However, BaseWidgetSheet still tracks
it. If that cell is clicked again after being reset, we want to show
the add button.
Bug: TODO
Test: manual
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD
Change-Id: I4614674948a52b8908fabf5c0e5734bf76b9282b
Scroll to show WidgetCell when it is tapped in a widget sheet.
Otherwise, the add button may show/hide without the user seeing
it if the bottom is clipped.
Bug: 329861721
Test: manual- tap WidgetCell when top or bottom is scrolled out of view
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD
Change-Id: Ie21730c193e845cb1c1fa447b7c0a7e719984a8f
This change updates the tap-to-add code to wait for the animations
between each step (close widget sheet, snap to Workspace page)
to finish before continuing with the next step of the flow.
Bug: 331425905
Bug: 331699050
Test: manual
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD
Change-Id: I774b86b429cd2e8a397e5605243056e6cea666b3
Widgets added with tap-to-add do not emit an ITEM_DROP_COMPELTED event,
so this change updates AppEventProducer to check for
WIDGET_ADD_BUTTON_TAP event so that it can emit an ACTION_PIN
event for these widgets as well.
Also moves the stats logging for tap to add to after
Launcher.addPendingItem is called, so that the PendingAddItem's container
is set to CONTAINER_DESKTOP.
Bug: 323886237
Test: manual, add widget and confirm event is produced through logging,
and widget no longer appears in suggestions
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add STAGING
Change-Id: Iaf46a408d05f61864a79f87b23160364b6513323
* Added finishCallback consumer to LauncherAccessibilityDelegate
to inform when adding an item to workspace was completed.
* The logic seemed to be dependent on the parameter
"focusForAccessibility", but all callers of that are currently
passing in true
Bug: 328646540
Test: https://paste.googleplex.com/6232597136408576
Newly added CUJs showing up when playing w/ device
Change-Id: Ia4944f8d23634bb92296938ea2d07a6babf6f77c
This change introduces an "Add" button that appears when a widget
preview is clicked in the widget picker. This button disappears when the
preview is clicked again, or another preview is clicked. When the button
is pressed, it adds that widget to the picker. The add button is
available in the app-specific widget sheet as well.
Bug: 323886237
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add DEVELOPMENT
Change-Id: I86a8a4c22119960c54a885fd2efeb91916b4f9a0
The change is really for enabling display of categorical suggestions,
so using the same flag.
Bug: 315055849
Bug: 318410881
Test: See screenshots
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: Ia98fdd6b827f31a63264128617f6a16ee0716bcc
The recycler view when displayed in single pane picker, for large screen
gets a larger padding. But when displayed in two pane picker, it is not
needed - so we override it.
Foldable's unfolded portrait doesn't seem to have screenshot test
- will look into if we can add one in follow up.
Bug: 322719955
Test: Screenshot test for existing modes & manual (see bug)
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker DEVELOPMENT
Change-Id: Ibd72146e7e5230eec0d2ce01c3917819a73d8f32
Fixed issue where upon opening the widgets menu in the home screen in landscape, then rotating screen to portrait, then back to landscape (whilst keeping widget sheet open), the buttons are dim colored rather than white.
Flag: NONE
Test: Manually tested in pixel 7 in light mode and dark mode (with home screen rotation enabled).
Bug: 284801356
Change-Id: I0ed59373eb3af5f1b5ab695b43b850777042d2eb
> Also removing check for dragHandle, since dragHandle is already removed
Bug: 307306823
Test: atest Launcher3Tests
Flag: N/A
Change-Id: I0b452dd1fbccf15ed686370471e8866b179fd77e
Removing debug logs for bugs that have already been closed. These logs are filling up the logcat buffer and impeding in other test investigations.
Flag: not needed
Test: Tapl tests
Bug: 260260325
Change-Id: I4d69b904f2ea79d758cf6bef7d90d172f2eb2a91
Currently, there's a few sections of the code that are intended to only be reached by tablets in landscape mode that can be reached by unfolded foldables. Here, we fix this so it no longer occurs.
Bug: 277102339
Test: Verify widget picker works correctly on tablet
Change-Id: I1f2bc99072aff6d852f9ce658ab00fa33b9e02b5
This ensures the navbar buttons are visible on large screens where All
Apps or Widgets picker are bottom sheets.
Test: Scrim is taskbar background color on devices with taskbar.
Bug: 264463659
Change-Id: I37890c0f542db625f9aeae7648bbaed064c4d240
Since the regular widget picker and the widget picker for tablet diverge quite a bit, we added a child class for it that extends WidgetsFullSheet.java
There should be no functionality changes with this CL, it's purely changes in code structure.
Bug: 256684299
Test: Turn on LARGE_SCREEN_WIDGET_PICKER flag and verify nothing changes compared to ag/20508230.
Change-Id: Ie0e93534d7b93017cc11a05f67728155d22951f9
-increase width of two pane picker
-center widgets when they're too few to overflow
-make background stretch out all the way to the bottom even when there aren't multiple widgets
-fit many widgets in one row if they fit
Bug: 256684299
Test: open widget picker and notice that all the listed fixes match the last figma added in the bug
Change-Id: Id4e8445f4ffe484c24c04fd9d1b4ffbf93a00bb2
This variable is now mutable, making the uppercase format misleading.
For instance, users might assume they can use this value in other
immutable properties, when they really should be accessing the latest
value every time they need it.
Context: https://source.android.com/docs/setup/contribute/code-style#follow-field-naming-conventions
Test: Manual
Bug: 271160958
Change-Id: Iaaa51d9153cb8a7d686c72e1210b1948029dcfd5
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.
Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
Check the size of the scrim and draw on the bottom of AllApps and Widgets.
Add a padding to the bottom of AllApps and Widgets so content is above the scrim.
Change the color of nav buttons for better accessibility.
Correct width of the Widgets sheets to be the same as AllApps sheet.
Fixes: 221107977
Fixes: 214215594
Test: manual, HSV and Window
Change-Id: Ib7510ffcd80231de7fefcdef65b422174dd74593
Bug: 221455508
Test: opened all apps, widgets, -1 screen, notifications shade and keyboard in various combinations and orders; locked screen, launched app, returned home with the back/home buttons, opened overview
Change-Id: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
Merged-In: Ia0b406aacf72b34bd6b7ff1c01278ab6895a7da4
(cherry picked from commit 9c1a452a1d)
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
wrap_content
If the widget preview has width / height set to wrap_content, we should
set the layout param width / height to the exact dimension after
measurement. Otherwise, we will end up clipping the previews.
Test: manual
Fix: 193144010
Change-Id: I101f7c6d3dbd264fee448b85c54029d5650d6630
picker
Fix: 192661517
Test: check widgets are fit correctly in both full & bottom widgets
picker in portrait and landscape in different grid settings.
Change-Id: Ic1b0589b7ccf62ff1ec1fd5713b4249ba58246a5
large screen devices
Test: Phone: Open the full widgets picker and observe the width of
the widgets picker fills the device screen width.
Large screen devices: Open the bottom widgets picker and observe
the width of the widgets picker only takes at most 80% of the
devices' screen width.
Same behavior is observed for bottom widgets picker.
Bug: 186425352
Change-Id: I801b73ea031a290fb6a7295dca826ac91841877e