Commit Graph

279 Commits

Author SHA1 Message Date
Hyunyoung Song
7eae6a4ce1 Merge "Icon should not disappear on drag and drop" into tm-qpr-dev 2023-03-26 07:22:55 +00:00
hyunyoungs
825480fbcc Icon should not disappear on drag and drop
Bug: 275009677
Test: BubbleTextViewTest

Change-Id: Iddff7a0130c9a0ddb76223064338459dbe9b52e8
2023-03-24 15:16:20 -07:00
Brandon Dayauon
f50106c322 Fix clipping in SearchResultBigIconRow
Remove the compound drawable padding being set in bubbleTextView because this causes the clipping.
This was originally set here horizontal layout, instead will set the correct compound drawable padding
on the horizontal container itself specifically (in another CL) so it doesn't affect other views/layoutTypes that uses
SearchResultBigIconRow

bug: 274723319
test: Manual - before: https://screenshot.googleplex.com/C2G6UXRMUkCJsAk
after: https://screenshot.googleplex.com/9R85bzfuiRiALqw
Change-Id: Ifee3016663225bc922fce602a52ab9f0534d1ef9
2023-03-22 22:16:07 +00:00
Tony Wickham
1e29b04f19 Set PredictedAppIcon ring disabled when icon is disabled
Test: drag a predicted app from taskbar, ensure both ring and icon are
set to grayscale
Fixes: 268759548

Change-Id: I764ebcd486c09eceaf30c5bd5153a1dd2ff5be72
2023-03-22 16:53:10 +00:00
Brandon Dayauon
26958a0961 Merge "Set textSize and compound drawable padding for mDisplay == DISPLAY_SEARCH_RESULT" into tm-qpr-dev 2023-03-16 22:52:47 +00:00
Brandon Dayauon
b1957cd6fb Set textSize and compound drawable padding for mDisplay == DISPLAY_SEARCH_RESULT
This is so it matches closely to all apps icons but the difference is that the icon size is 48dp.

bug: 261047689
test: manual - https://screenshot.googleplex.com/83YwnfwSfR6CJRB and https://screenshot.googleplex.com/68Yqz9hk5NHETKK
Change-Id: I381d9415d2a80a9d36291828a1a31d0c83fc395e
2023-03-14 13:27:30 -07:00
Brandon Dayauon
2b3343018e Shortcut/people icon horizontal layout polish
- allow two line for SearchResultShortcutIcons (also be used in search_result_icon_container)

bug: 261047689
test: manual - https://screenshot.googleplex.com/9wwjxp3nqf4iyJr
Change-Id: Ie8d1415ea94f843f32abb9e4416064c1b674be6d
2023-03-14 11:03:18 -07:00
Brandon Dayauon
5ddc6ab4da Merge "Support two line text in AllApps/OnDeviceSearch w/ feature flag" into tm-qpr-dev 2023-03-10 17:21:37 +00:00
Brandon Dayauon
cf88ea1e62 Support two line text in AllApps/OnDeviceSearch w/ feature flag
Made separate feature flag for on device search
Add unit test to test twoLine string
- Unit tests for testing newStringThatShouldSupportTwoLineText() in BubbleTextView.java. This class tests a couple of strings
and uses the getLineCount() to determine if the test passes. Verifying with getLineCount() is sufficient since BubbleTextView can only be in one line or two lines,
and this is enough to ensure whether the string should be specifically wrapped onto the second line and to ensure truncation.

bug: 201388851
test: presubmit, ran locally on big and small device, before: https://screenshot.googleplex.com/3Q6pwveFDZqxDXL (ORIGINAL TWO LINE TEXT)
after:  https://screenshot.googleplex.com/7pkwUto6HGzMYoT

Change-Id: I93e6ed179e1081d5cdffc6db9c7ae34de8021c24
2023-03-09 15:13:04 -08:00
Federico Baron
db599b2d8e Fix bug where homescreen shows installation completed when it's technically still downloading and fix animation that repeats in apps with quick install
Fix: 269702659
Test: Download an app that has a lighning next to the install text and verify that the animation plays smoothly and that it doesn't animate until we finish downloading completely.
Change-Id: I11147444a85db01c75d63b5cdd09d1d911a28c75
2023-03-09 14:44:41 -08:00
Sunny Goyal
82dfc15037 Simplifying code around multiple translation components
Bug: 270759683
Test: Verified on device
Change-Id: I6c758c715828ae25e0e3c60b793cf85d70cb2487
2023-03-02 12:22:03 -08:00
Jagrut Desai
3addf0b66d Merge "Implement All Apps Icon upto the visual Specs." into tm-qpr-dev 2023-02-25 01:49:59 +00:00
Jagrut Desai
560b0eac62 Implement All Apps Icon upto the visual Specs.
Test: Visual
Bug: 267382941

Change-Id: If675c2f4767014598b23d8a2c2e684f5a8fb4f19
2023-02-24 15:41:06 -08:00
Brandon Dayauon
97baa50a07 Merge "Make shortcuts on people row themed" into tm-qpr-dev 2023-02-22 01:44:04 +00:00
Jon Miranda
13e9b9f889 Translate the taskbar icons to match nav handle shape.
- We need to reset icon alignment whenever icon layout bound
  changes. This fixes the issue where we build an icon
  alignment animator before any of the views are laid out.
- Separated animation logic between.
  createTransientAnimToIsStashed and createAnimToIsStashed
* The values still require a bit more tuning but this gets us
  a lot closer to spec for many of the motion polish.

Bug: 267806083
Bug: 246634367
Bug: 246635237
Test: manual
Change-Id: Id122134b22ef4e418ce632e4a8137239dc8bb313
2023-02-17 10:56:59 -08:00
Brandon Dayauon
e640a9ea00 Make shortcuts on people row themed
bug: 260112992
test: before: https://screenshot.googleplex.com/AVeT2GF94TGqYfn
test: after: https://screenshot.googleplex.com/9d8dpDGfTQ8gnrb
Change-Id: I3c4c237a231bff6e60b26d48a8811b8272a4ee63
2023-02-03 14:14:15 -08:00
Federico Baron
4eb502ae10 Add finish icon scale animation for downloading apps
We add an animation when we finish downloading an app where the scale of the icon increases to from scale 0.867 to scale 1

Bug: 254858049
Test: Download an app and visualize finish download animation
Change-Id: I67912f86b0e35091a5fe1b39c3463a1ff203bd3b
2023-01-13 15:35:14 -08:00
Sunny Goyal
47d4d81b4f Cleaning Utilities.java
> Removing some unused methods
> Moving some specialized methods to corresponding classes
> Removing GridProvider check as it is released

Bug: 257555083
Test: Presubmit
Change-Id: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
Merged-In: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
2022-11-17 01:06:16 +00:00
Brandon Dayauon
d3755f46cc Scale icons from search to make app icons big like AA -> workspace
when dragging from search.

To scale the icon during dragging (instead of long press) I created a scale variable within DragOptions
so that right before dragStart gets called in DragController.java (in callOnDragStart())
the dragview scales before dragging..
 * note: the scale from search is 1.687 and the scale from allApps is 1.107
- included searchResult and smallSearchResult
- Added animation for scaling icon (used Interpolators.EMPHASIZED 500ms as suggested by motion designer)
- Cancel animation when drag finishes

bug: 222666176
test: Manual - after: https://drive.google.com/file/d/1ZZHnXlzdTxlM-RUIdJ6EOYkPPg6tCUxC/view?usp=sharing
before: https://drive.google.com/file/d/1NpBz3kT_slHXtpXObr_G8K6SZYG9_bLX/view?usp=sharing

Change-Id: I01309a3be928987ba00422ad947b80a3df865973
2022-10-11 13:29:35 -07:00
James O'Leary
ede514f275 Update notification dot from T90 to T80
Bug: 213314628
Test: work with UX to pick something darker than T80, present options
from T70 to T90, get feedback to use T80, verify at runtime via
screenshot dot is T80.

Change-Id: Ic5b47a419eb7697c22c4dd9ab849b8a00d73be9f
2022-06-06 16:01:45 -04:00
Sunny Goyal
d7281d097d Merge "Adding support for easily extending Launcher DragAndDrop support" into tm-dev 2022-05-12 17:00:49 +00:00
Sunny Goyal
f0ff70a2a5 Adding support for easily extending Launcher DragAndDrop support
Bug: 232165524
Test: Verified locally
Change-Id: I3b4f37bc9914de55330662edd678e6fdd0eafece
2022-05-11 21:34:08 +00:00
James O'Leary
1557ba37c1 Separate color into app color and dot color; specify dot color
Design intends for predicted app disc to use the app color, and the
dot to use tertiary T90/shade100. Both currently use `color`. Separating
into two separate colors lets use define the two separate colors
requested by design.

Bug: 213314628
Test: Manual inspection at runtime
Change-Id: If50c32d0bf67493192ce32a33775311d58f21942
2022-05-11 16:57:49 +00:00
Sunny Goyal
52f4c16a94 Revert^2 "Removing some unused code from All-Apps"
13ae6784b5

Change-Id: I06a4c9cc6beba4fc87b4a9375872c68e71e1c5f6
2022-04-27 03:22:58 +00:00
Sunny Goyal
13ae6784b5 Revert "Removing some unused code from All-Apps"
Revert submission 17866780-cancel-request

Reason for revert: wrong icons

Reverted Changes:
Iedc98e5ef:Cancelling previous request and clearing UI when a...
I72394fb42:Removing some unused code from All-Apps

Change-Id: I2ecefcaf07e6105a10f86b8dc19f75089e45a3e0
2022-04-22 19:53:37 +00:00
Sunny Goyal
3946ecd441 Removing some unused code from All-Apps
Bug: 229860311
Test: Verified on device
Change-Id: I72394fb421679688f87cdbf725859ec35529a59e
2022-04-20 09:54:48 -07:00
Stefan Andonian
1d57706125 Update monochrome theme icon notification dot color
Bug: 189498337
Test: Hard-coded the notification dots to be visible, and verified they were the correct color.
Screenshot: https://screenshot.googleplex.com/AVbbW6P2bm6jYNS
Change-Id: I38a78cda056273eb300d458e663f79ccdd28f36a
2022-03-29 16:21:32 +00:00
Jon Miranda
fe74997235 Fix NPE in BubbleTextView
- Icon can be null when we use BTV for text only

Bug: 223809081
Test: manual
Change-Id: I9efd8e4b420127beb249b20e71ae37c359bb6467
2022-03-15 10:02:39 -07:00
Andy Wickham
56be73be80 Utilities.trim never returns null.
This fixes a crash loop I was seeing on my device and also
preemptively fixes similar NullPointerExceptions.

Bug: 213931730
Test: Manually verified crash loop stopped with this change.
Change-Id: I8d2fc8475d42ac60b7fdc9219421a8c9733c7b9f
2022-01-18 09:13:43 -08:00
Sunny Goyal
331e6e94f9 Merge "Updating icon badging logic" 2021-12-03 02:14:42 +00:00
Sunny Goyal
d872a97bd0 Updating icon badging logic
Bug: 201682172
Test: Manual
Change-Id: I57421b0c77e12f1cd464e532d2a1383c2cf93981
2021-12-02 22:14:25 +00:00
Schneider Victor-tulias
bdb0dd8cfb Refactor LauncherAccessibilityDelegate so it can be used outside of Launcher
Bug: 198438631
Test: used talkback on launcher
Change-Id: I991320184ad93816c4ba21fb8fcfe12202bfae25
2021-11-23 12:48:14 -08:00
TreeHugger Robot
903065a490 Merge "Fix wrong getIconBounds method inside BubbleTextView" into sc-v2-dev am: 31bd663332 am: c1d0a5a6fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16186109

Change-Id: If8a2b62b5f1166dd53905482c3ef139e4801b550
2021-11-10 10:09:58 +00:00
Hyunyoung Song
c2f024beb6 Fix wrong getIconBounds method inside BubbleTextView
Bug: 205065809
Test: screenshot on the bug

TL;DR;; created two variants depending on the layout direction

Change-Id: I9c5e74409c701b1f219ca450de0dca2291507045
2021-11-09 11:39:21 -08:00
Rajeev Kumar
5cc195f449 Merge "P2P App Sharing: Gray out disabled SystemShortcut" 2021-10-29 22:32:44 +00:00
Jon Spivack
688621498a P2P App Sharing: Gray out disabled SystemShortcut
The Share App system shortcut is disabled for apps that are deemed unshareable. This updates the UX to gray out the shortcut instead of hiding it. When the user clicks on the grayed out shortcut, a Toast message is displayed. This update also enables the shareability check.

In order to properly gray out the shortcut, this also fixes a bug with BubbleTextView in which ColorStateLists weren't applied correctly.

Bug: 202556634
Bug: 204495363
Test: Manual (observed UX on Wembley device in regular and dark themes)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: Ieb04baf8c9cb9d325119cb97fceb96f2fc5a62ff
2021-10-28 19:30:31 -07:00
Sunny Goyal
486adb03a0 Fixing wrong text spacing bounds
Bug: 203740844
Test: Manual
Change-Id: I68fcab489643acf80759f90736f806ae2852e648
2021-10-21 11:30:18 -07:00
Samuel Fufa
f0f2b75ada Merge "[Search] [Race condition] Fix wrong titles showing on BubbleTextHolder" into sc-v2-dev 2021-10-20 03:15:25 +00:00
sfufa@google.com
d7bdd97ac6 [Search] [Race condition] Fix wrong titles showing on BubbleTextHolder
No need to remove the listener on BubbleTextView#reset as BubbleTextView's parent should never change and always listen for ItemInfo updates.

Bug: 203506475
Test: Manual
Change-Id: Ie00b293495c79d36c9eb08408754389ab4b80839
2021-10-19 17:15:06 -07:00
Sunny Goyal
37a237b2cd Merge "Adding support for dynamic letter spacing for icon labels" into sc-v2-dev 2021-10-19 22:56:16 +00:00
Sunny Goyal
0d69cb6ef7 Adding support for dynamic letter spacing for icon labels
Bug: 201697936
Test: Manual
Change-Id: I0ab81291c40afcac30c5caf7b5638889908775f8
2021-10-19 13:09:58 -07:00
sfufa@google.com
0fe464ddb9 [Search] Fix ItemInfo assignment conflict
When a BubbleTextHolder has more than one bubble text view, BubbleTextView#getParent().onItemInfoChanged is problematic as the ItemInfo associated with the last BubbleTextView will be the final ItemInfo set on parent. This is fixed by setting ItemInfo change receiver more explicitly.

Bug: 203020679
Test: Manual
Change-Id: Ia8aeead1a6151c2aa47148ba4846ae3d3ee39b73
2021-10-14 14:35:08 -07:00
sfufa@google.com
ca76de0e6e Support drag/drop on search results
Bug: 199341710
Test: manual
Change-Id: I9879c2a3769d4f930ab0289d2f26e4757971549d
2021-10-04 13:14:12 -07:00
Steven Ng
707b118184 Use ICU to format plural strings
Test: manual
Fix: 199230208
Change-Id: I0b6fe9f8bb134a1479117c832575c63da2a07794
2021-09-17 22:44:06 +01:00
Nick Chameyev
4dd4159fdc Add taskbar icons unfold animation
Adds 'move from center' animation for taskbar icons when
unfolding foldable devices.

Moves unfold transition progress provider from quickstep
launcher activity to TouchInteractionService to widen
the scope when this provider is available to cover
both launcher activity and taskbar.

Launcher activity and taskbar get their own instances
of unfold transition progress provider using
ScopedUnfoldTransitionProgressProvider wrapper.
This wrapper allows to get transition progress provider
that emits events only when clients are ready to handle them.

Bug: 193794563
Test: manual
Change-Id: I27581bd4e145a74f526bf60f2a545e56ded322f9
2021-09-03 10:25:52 +01:00
Tony Wickham
42b0395fee Fix some taskbar stashing issues
- Don't allow long press to stash between taskbar icons
- Ensure taskbar_icon_touch_size is respected; previously it wasn't, because BubbleTextView@shouldIgnoreTouchDown() was returning true in the padding region. For taskbar, we want the whole icon size to be touchable.
- Cancel long press when passing touch slop to avoid swipe down being detected as long press

Test: long press on taskbar background, both between icons and not; swipe down on taskbar
Fixes: 198305464
Change-Id: I36f1d792e91da9a3bf57a2bef1e974b299c4e25c
2021-08-31 14:06:09 -07:00
Tony Wickham
175d152f76 Animate PredictedAppIcon when its icon changes
Reuses the slot machine animation to slide in the new icon. Additionally, staggers based on other icons changing before it.

Test: open apps, watch predictions change
Bug: 197780290
Change-Id: Ib2bc84193a9e350c915dd3486b6c98c6c88d3f83
2021-08-26 13:00:51 -07:00
Nick Chameyev
02c0c924a6 Merge "Add unfold animation to launcher icons and widgets" into sc-v2-dev 2021-08-11 18:04:03 +00:00
Nick Chameyev
5e8dbe77e8 Add unfold animation to launcher icons and widgets
Adds unfold animation to launcher which translates
icons and widgets from the center to the sides on
foldable devices.

Bug: 193794541
Test: manual
Change-Id: I9d6e018a0451d342f02dddea47bc180781c31d43
2021-08-11 16:10:18 +01:00
Sunny Goyal
59f1915c9d Using themed icons in taskbar
Bug: 195437559
Test: Verified on device
Change-Id: If8c0a72e037783e96abbaae6b60aa36a686fcfea
2021-08-03 12:25:22 -07:00