Commit Graph

770 Commits

Author SHA1 Message Date
Alina Zaidi
df9582e559 Merge "Fix UI bugs for widget picker search." into sc-dev 2021-04-13 15:42:34 +00:00
Alina Zaidi
1ccd7efaf0 Fix UI bugs for widget picker search.
- Mirror search icon in RTL (b/184162989)
- Fix spacing between edit text and cancel button, to make it consistent
with space between search icon and edit text. (b/183602001)
- Scroll to top on every search result. (b/183602001)
- Fix keyboard overlap on orientation change. This is fixed by clearing
text on edit text differently (b/184048899)

Test: Manually tested
Bug: 184162989
Bug: 183602001
Bug: 184048899
Change-Id: I72ed51e1968a55a3105bd8b389d1bbd74d50d8af
2021-04-13 10:41:18 +01:00
Steven Ng
3691179041 Set width & height of app icons in all widgets tray to 48dp
Bug: 184877669
Test: Change the grid size and observe app icons in all widgets
      tray stay the same.
Change-Id: I856d5fada579474fffb6296d641fb686623ca2cc
2021-04-09 11:15:50 +01:00
Steven Ng
1b5e45acae Merge "Use a separate personal/work tabs layout for the widget picker" into sc-dev 2021-04-08 18:48:52 +00:00
Steven Ng
fd604ee7ae Use a separate personal/work tabs layout for the widget picker
1. Apps are feminine while widgets are masculine in some languages.
   We should use a different set of strings to ensure strings are
   translated with the right context.
2. We will be using a different theme for widget tabs. Let's keep
   the layout separate.

Bug: 184613311
Test: manual
Change-Id: I88df8ca6091e4b6ddf81f34f180a6ce2cada16e3
2021-04-08 11:14:24 +00:00
TreeHugger Robot
63c169561c Merge "Some cleanup in RecentsView" into sc-dev 2021-04-07 21:06:55 +00:00
Pierre Barbier de Reuille
ad41a56166 Stop trying to draw a view not attached to the view tree
The behavior of the framework when we try to do so is undefined. In our
case, it almost work, but no clipping is applied, which is a problem for
Android S (before that, widget couldn't use clipping in the first
place).

Instead of drawing the view through a drawable, this really add the view
and adds also a badge ImageView for badges instead of drawing them
indirectly.

Note that, temporarily, we have to re-allow drawing the view after it
has been attached, but the underlying framework bug being fixed, this
should be fine (I tested it and it really seems to be).

Bug: 183609936
Test: Using hand designed app (see bug)
Change-Id: I929ef8fc81c98c49406f2d940cd5efc28319886d
2021-04-07 15:51:43 +01:00
Sunny Goyal
c82916fecb Some cleanup in RecentsView
> Merging overview and all-apps scrims into a single View
> Decoupling TaskMenuView from taskView

Bug: 184676497
Test: Manual

Change-Id: I49f7249eaa2a800054385ab8e73a441d6a1b5e16
2021-04-06 15:47:33 -07:00
Alex Chau
dfde4d96ea Focus running task in overview grid
- calculateTaskSize now returns the Rect for focused task
- Introduced calculateGridTaskSize for non-focused task, and translate non-focused tasks to fit the grid
- As Task Rect is now vertically centered, removed ClearAllButton's grid vertical translation
- When ClearAllButton is not shown (e.g. quickswitch), make sure ClearAllButton's scroll won't be used when page snapping. This happens when page scrolls are translated so they're negative.
- Added back ActionsView when task is focused below the TaskView, which become invisible as you scroll
- In Modal state, move the ActionsView down so it won't cover the TaskView

Bug: 175939487
Test: manual
Change-Id: Idfa94a51f856418adc0503cf04211dcb4b1814fe
2021-04-01 14:52:25 +01:00
Samuel Fufa
c699c01812 Merge "[Search] Resolve work/personal tab overlap with A-Z list" into sc-dev 2021-03-25 13:34:17 +00:00
Yogisha Dixit
73c8a366a8 Add a button for reconfiguring widgets.
Test: manual
Bug: 183316993
Change-Id: I17bec121e3d07d65979c2b92c285e487a7d64d65
2021-03-24 13:34:29 +00:00
Alina Zaidi
305a44c935 Merge "Bug fixes for widget picker search (2/n)" into sc-dev 2021-03-24 09:47:26 +00:00
TreeHugger Robot
cb6dff62d9 Merge changes I6ce23251,I56fca1b7 into sc-dev
* changes:
  Update the resize frame to use the forced radius.
  Enforce rounded corners on App Widgets.
2021-03-24 00:39:17 +00:00
TreeHugger Robot
acb3cac938 Merge "Update Pin widget dialog UI according to mocks." into sc-dev 2021-03-24 00:29:41 +00:00
Jonathan Miranda
0fa5225d57 Merge "Updating deep shortcut container to new width." into sc-dev 2021-03-23 21:30:46 +00:00
Pierre Barbier de Reuille
452df2d5bb Update the resize frame to use the forced radius.
When forcing the rounded corners, the radius may be smaller than the
default one. When this happens, we should change how the frame is drawn
to only use that reduced radius, or this looks weird.

Bug: 183097166
Test: Manual tests with top 1P App Widgets
Change-Id: I6ce232515ce14059e1168e16735719ea2370132c
2021-03-23 20:57:33 +00:00
Tony Wickham
3629b93546 Merge "Add TaskbarView as a child of Hotseat" into sc-dev 2021-03-23 18:36:53 +00:00
Samuel Fufa
c6995f3eb2 [Search] Resolve work/personal tab overlap with A-Z list
This issue was caused due to launcher falling out of sync with DEVICE_SEARCH_FLAG. This change makes AllApps views agnostic of search input type when rendering layout.

Bug: 182591985
Test: local
Change-Id: Ic015b68e110eea9ab5184325f2a3633a5c7d15cc
2021-03-23 11:09:15 -05:00
Jon Miranda
e888b08b70 Updating deep shortcut container to new width.
Bug: 175329686
Test: manual, visual
Change-Id: I0487d240523ab3de4bf3e381ec359267eaa33a71
2021-03-23 12:00:38 -04:00
Alina Zaidi
6d97d893e0 Update Pin widget dialog UI according to mocks.
Test: Tested manually and RequestPinItemTest passed
Bug: 182982143
Bug: 182994819
Bug: 182929673
Change-Id: I905ea0c1860d28ee9fbb456ddf6abd728b65bac4
2021-03-23 13:36:48 +00:00
Alina Zaidi
76060eb11b Bug fixes for widget picker search (2/n)
- Dismiss keyboard when user starts to drag widget picker
- Add content description for cancel button

Test: Tested manually.
Bug: 183211445
Bug: 183106676
Change-Id: Ie620c3d50a49d8380f316d48e4ee8ebced6de5eb
2021-03-23 12:53:23 +00:00
Tony Wickham
9ce3b25ef6 Add TaskbarView as a child of Hotseat
Instead of keeping the Taskbar window showing above the home screen,
we now integrate a copy of TaskbarView directly into Launcher's view
hierarchy. Most TaskbarController calls apply to both TaskbarViews
(mTaskbarViewInApp and mTaskbarViewOnHome), except for calls related
to Hotseat, which only apply to mTasbkarViewInApp given the real
Hotseat will be showing with mTaskbarViewOnHome.

More cleanup will follow this change.

Test: All taskbar interactions (e.g. drag and drop) continue to work
Bug: 182512211
Bug: 171917176
Change-Id: I0f0b124f652daa85f866e1df8f9e2981540331a0
2021-03-22 15:26:01 -07:00
Steven Ng
867ff5f60c Update title of bottom widgets tray
Only use the "app name" instead of "app name widgets" as title
Remove "Touch & hold to move a widget" subtitle.

Test: manual

Bug: 179797520
Change-Id: I7a5954af73aa5b480096e93ade3520cef6c93f17
2021-03-22 22:23:46 +00:00
Steven Ng
e4c0e954d3 Exact common layout from widgets bottom sheet
Test: open widgets bottom sheet and drag and drop widgets & shortcuts.

Bug: 182305634
Change-Id: I82e3e584edf64177ffa6e677f5b3f487823d3e1b
2021-03-22 17:50:49 +00:00
Steven Ng
4235fc129c Renders widget recommendations
Update the tapl test logic to scroll a smaller distance to avoid the
search bar blocking the target touch area.

Test: Open full widgets sheet and observe the widget recommendations
      shown at the top.
      Run AddConfigWidgetTest

Bug: 179797520

Change-Id: I6d53bbb46e2cb928ed7d015aaac604be17d33178
2021-03-19 21:11:32 +00:00
Steven Ng
1e29433fc6 Merge "A11y fix for all widgets tray (Part 1 / n)" into sc-dev 2021-03-19 17:44:59 +00:00
Alina Zaidi
7358069a91 Merge "Fix bugs for Widgets picker Search UI." into sc-dev 2021-03-19 16:57:11 +00:00
Alina Zaidi
c4f3f49805 Fix bugs for Widgets picker Search UI.
- On orientation change, clear search bar.
- Change text and search bar color to make similar to mocks/ all apps search bar.
- Fix search recycler view visual bugs.
- If back is pressed in search mode, exit search mode instead of exiting widget picker.

Test: Manually seen widget picker on phone.
Bug: 183103133
Bug: 183103936
Bug: 183115050
Bug: 157286785
Change-Id: I056f089eada84d00133038f4a3d7b18bc51be564
2021-03-19 14:42:47 +00:00
Jonathan Miranda
b0cb399d21 Merge "Update deep shortcut to new ui." into sc-dev 2021-03-19 13:31:08 +00:00
Steven Ng
8eb1f73d58 A11y fix for all widgets tray (Part 1 / n)
Mark some image view unimportant for accessibility.
Still need to update the content description for widget list
header to describe the expand / collapse action.

Test: Navigate all widgets tray with talkback enabled.

Bug: 183120145
Change-Id: I1801d8351ac7f22a0135a96a36de706377781b31
2021-03-18 23:42:56 +00:00
Sunny Goyal
fa699566f5 Merge "Adding an optional QSB in hotseat" into sc-dev 2021-03-18 16:07:45 +00:00
Alina Zaidi
cc2c8a5cb1 Merge "Improvements to widget picker search." into sc-dev 2021-03-18 15:29:16 +00:00
Jon Miranda
c79316740b Update deep shortcut to new ui.
- Removed divider views, using margin to separate views
- Removed elevations
- Added a ViewGroup to hold all notification views, and applied an outline

Bug: 175329686
Test: visual
Change-Id: Iad70dcfdaeba6050c2b17c07f76bb7bfb728e544
2021-03-18 11:09:34 -04:00
Alina Zaidi
cb76e7d16f Improvements to widget picker search.
-Expand clickable area on search bar.

Test: Tested prototype locally.
Bug: b/157286785
Change-Id: I70a4edb1ce207f4dae9a0909c05e0823840500dd
2021-03-18 12:13:18 +00:00
Steven Ng
66ccd29a3d Adjust bottom picker padding / margin & add a drag handle
Test: Manual
Bug: 179797520
Change-Id: I594bf2cf140a31f20d41fbb9804197724478caf9
2021-03-18 12:09:45 +00:00
Alina Zaidi
378ca5e920 Merge "Bug fixes for widget picker search." into sc-dev 2021-03-18 10:32:18 +00:00
Steven Ng
99060b30ca Merge "Adjust font, color, margin, corners for all widgets tray" into sc-dev 2021-03-18 10:25:00 +00:00
Steven Ng
08ef694509 Adjust font, color, margin, corners for all widgets tray
Test: manually
Bug: 179797520
Change-Id: Ib78aae05e021da272ef2f754c876d24a4c14bcb0
2021-03-17 22:43:12 +00:00
Sunny Goyal
c373e1c642 Adding an optional QSB in hotseat
Removing sections in all-apps during transition and treating
it as a single unit

Bug: 175137718
Test: Manual
Change-Id: I55a501d80b5903f1a9d92a26b3784784fd9e50fd
2021-03-17 12:21:44 -07:00
Alina Zaidi
2e732e95d9 Bug fixes for widget picker search.
SearchBarController
- Use Extended Edit Text to handle close keyboard action well.
- On press enter while search remove focus from bar and hide keyboard.
- On cancel button press hide keyboard and also reset search targets to empty so that on next search session the previous results dont flash (show for a short time before reflecting users query).

WidgetsFullSheet
- Make sure expanded header are reset when user leaves personal/work recycler views. Search recycler view resets its expanded header on every search already.
- Show 'no search results' view if no search result present.
- Update WidgetListBaseRowEntryComparator to show personal profile widgets first.

Test: Tested prototype locally.
Bug: b/157286785
Change-Id: Ibaa208c4091783e14ac0887caf559e867185df5a
2021-03-17 14:43:04 +00:00
Yogisha Dixit
6d593d891e Merge "Fix bug with resize frame disappearing." into sc-dev 2021-03-17 10:27:33 +00:00
Yogisha Dixit
f9954cc4cc Fix bug with resize frame disappearing.
Currently, if you resize the widget to the top, bottom or right, the
resize frame disappears. This is because the AppWidgetResizeFrame code
relies on the indices of the child elements to find the drag handles.

I updated the code to instead use IDs since that is more robust.

Test: manual
Bug: 182305670
Change-Id: Iaa9d32c9190fb579101914f03d57bb48dcecb88d
2021-03-16 21:31:46 +00:00
Alina Zaidi
1632752a72 Have an interface for WidgetsSearchBar so Nexus Launcher can override the search bar.
Test: Tested prototype locally.
Bug: b/157286785
Change-Id: I263063a451862755efe3d6e4a5a2eb69f2ea29b8
2021-03-16 09:25:22 +00:00
Alina Zaidi
e17f4651d0 Merge changes from topic "SEARCH_INTEGRATE" into sc-dev
* changes:
  Add a WidgetsSearchBar(Launcher3) and a WidgetsSearchController.
  Have a recycler view to show search results.
2021-03-15 13:24:20 +00:00
Alina Zaidi
d07acba048 Add a WidgetsSearchBar(Launcher3) and a WidgetsSearchController.
- Make WidgetsSearchBar in Launcher3 initialize WidgetsSearchController with SimpleWidgetsSearchPipeline
- Modify SimpleWidgetsSearchPipeline to filter widgets entries on widgets/shortcut labels also.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: I65f5fa0240ffb6d22023167e4e86d94d83bbd9f7
2021-03-15 11:25:08 +00:00
Steven Ng
53d1364e8b Better estimate the height of widget recycler view
Test: Expand and collapse apps in the widgets picker. Then, observe
      the height of the fast scroller is correctly displayed.

Bug: 181629430
Change-Id: I9efcf902f8548fc5c8a398609758d43123228e5e
2021-03-12 22:58:45 +00:00
Alina Zaidi
334e65935b Have a recycler view to show search results.
-Have a recycler view layout for search widgets list.
-Make WidgetsFullSheet implement interface- SearchModeListener to get notified when user is using search and also when search results are ready.
-Have a WidgetsListSearchHeaderViewHolderBinder for search result headers which shows subtext in header as concatenated string of widget/shortcut labels.
-Modify WidgetsListAdapter and WidgetsDiffReporter to work well with search recycler view.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: Ie29d9f295fddb6d727b5fc26a360f514f2f4a763
2021-03-11 21:27:51 +00:00
Steven Ng
d73d6e56a9 Show an empty view when there is no widget available
Test: Remove all widgets from work profile using TestDpc. Observe
      empty view is shown in the full widget tray. Add back some
      widgets to work profile and observe widgets showing up in the
      full widgets tray

Bug: 179797520
Change-Id: I2e1fcb5a0014568a4674e2bcc0a3ed3c6ec5a44a
2021-03-10 17:36:37 +00:00
Steven Ng
ae6b34811b WidgetCell & LiveWidgetPreview cleanup
The fixes are:
1. For widgets shown in TableRow, aligns them center vertically.
   This is useful when widgets of different height are shown in
   the same row.
2. Remove background color from WidgetCell
3. Re-enable swipe in FullWidgetsSheet
4. Use the WidgetCell image as the single & long press area because
   1. Previews are now scaled to their default size. The touch area
      should already be larger for widgets that are bigger than 2.4
      cells
   2. WidgetCells also render description. If the user long press the
      description area, the drag view will not align in the middle of
      the user touch / drag area.

Test: Drag-n-drop widgets from FullWidgetsSheet, BottomWidgetsSheet
      and pin widget flow.
      In FullWidgetsSheet, swipe left and right to switch work /
      personal tab.

Video: https://drive.google.com/file/d/1Ur7PwF1a7iwGGRTZczfc0BSVu-Ta6-Vm/view?usp=sharing

Bug: 179797520
Change-Id: I6fe4bc88d1e1b35b1819d8d7f046105f5ed27043
2021-03-08 21:22:08 +00:00
TreeHugger Robot
b6c4fd18af Merge "Update app widget resize frame UI." into sc-dev 2021-03-08 16:06:12 +00:00