Commit Graph

288 Commits

Author SHA1 Message Date
Pat Manning
77dce5f27a Merge "Do not clip scaled Launcher icons on hover." into udc-qpr-dev 2023-08-23 22:24:40 +00:00
Kevin Lim
b3b467c27f [NexusLauncher] Expose setLayoutHorizontal.
mLayoutHorizontal is exposed so that classes that extend BubbleTextView
can override this programmatically based on LayoutType.

mLayoutHorizontal prevents the title in horizontal cases affecting the
icon bounds measure, and shifting things such as the icon halo.

Bug: b/288471727
Test: See ag/24199217
Test: New tests in SearchResultIconTest
Test: No regression in SearchResultSmallIconRowTest
Change-Id: I424c1597d29ed26d7dea9e666ff2d274847e3217
2023-08-23 19:13:59 +00:00
Pat Manning
d0f729d13c Do not clip scaled Launcher icons on hover.
Include change for setting the hover state flag programatically, as FastBitmapDrawable does not currently support DeviceConfig flags.

Fix: 243191650
Test: FastBitmapDrawableTest. Screenshot tests in another cl.
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: I0eb796ae62e571a3287132bfcb99c4fca1e2fbe4
2023-08-23 08:45:43 +00:00
Brandon Dayauon
7e3761614f Make mDisplay DISPLAY_SEARCH_RESULT visible for test
bug: 278922113
Test: locally manually
Flag: n/a
Change-Id: I4c5dcecca66466f796f1fbdc25698da55e50f156
2023-07-11 14:20:14 +00:00
Brandon Dayauon
f2ea399ec6 Fix prediction row title consistency
There's an inconsistency with prediction row in 0-state and all apps page.
This happens because we change the number of lines (to 1 line) after calculating and rendering the two lines.
Which is why if you look at the photos, in all apps, Amazon app just shows "Amazon" instead of "Amazon Sh.."

Instead of changing the number of lines after processing, just set a separate display to the prediction app row

bug:288811197
Flag: teamfood
Test: manual - locally added test BubbleTextView
before 0-state: https://screenshot.googleplex.com/5q9iYypgwwtDa8b
before allapps prediction row: https://screenshot.googleplex.com/BVxGMTT43stDzZ9
after allapps prediction row: https://screenshot.googleplex.com/BfNTFPXwf4FHuRN

Change-Id: Ifefe6dc8dd4a117be7b63f92ff837d0467a51f8b
2023-06-28 14:45:07 -07:00
Thales Lima
7945649c5e Implement calculations of Responsive Grid in DeviceProfile
When a grid has a responsive spec and the feature flag is on, use the new calculations for the sizes in Workspace. This shouldn't affect Scalable grids.

Fix: 277064708
Test: HomeScreenImageTest
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Idef3d17fbfa1b2e0c82c12e7784a7584f1ba1b88
2023-05-30 16:14:34 +00:00
fbaron
1406a0f606 Update notification dot color
Bug: 268521231
Test: Verify that notification dot colors match the figma attached in the bug
Change-Id: Id0cbf9f2447819ae3e6e00e880eca1be3f189826
2023-05-15 11:06:46 -07:00
Brandon Dayauon
7d67331c72 Fix two line item of app-title only in A-Z list and not predicted app row
Create protected method that would be overidden if two lines should be supported

bug: 274686392
test: manual
Change-Id: I34bbd9980aee70397ee75744bedfa61c340a2741
2023-04-19 15:15:16 -07:00
fbaron
6664d8c80b Update the pending app icon to match new specs
Bug: 276950579
Test: Download apps and verify that they match the updated specs
Change-Id: I03b9a5c87514e91c646e961ec57f63f1305d0327
2023-04-04 13:40:55 -07:00
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