Commit Graph

447 Commits

Author SHA1 Message Date
Mehdi Afshar
bb801b2553 Custom folder color support 2022-09-07 13:24:47 +04:30
Patryk Michalik
1f5597a908 Update dependencies 2022-06-17 18:39:24 +02:00
Yasan Ghaffarian
b2ea11ffb6 Lock homescreen when homescreen content is locked in prefs
Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
2022-05-29 11:30:11 +04:30
YASAN
074a102ded Notification count support for Notification Dots (#2587)
* Add notification dot counter to preferences

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>

* Add counter support to notification dots

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
2022-05-16 23:17:02 +07:00
Suphon Thanakornpakapong
f2c86f4671 Fix folder opacity pref 2022-05-09 18:49:42 +07:00
Suphon Thanakornpakapong
54e68e8597 Use dynamic colors for folder background 2022-05-09 18:48:59 +07:00
Suphon Thanakornpakapong
28df5361d4 Fix build 2022-05-08 21:31:31 +07:00
Suphon Thanakornpakapong
11e1a2fdc8 Merge remote-tracking branch 'aosp/android12L-release' into 12.1-dev 2022-05-08 20:29:17 +07:00
Patryk
ac187ea88d Migrate “pref_folderPreviewBgOpacity” to Preferences DataStore 2022-03-01 11:06:28 +01: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
Benno Lin
5261776d3a Update TAPL to operate on folder icons.
The change updates features listed as follow:

1. Create a new class for folder icon.
2. Implement function to drag a icon to the other.
   (create a folder)
3. Find folders in a workspace.

Bug: 199120092
Test: Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testDragToFolder
Change-Id: I3044025f8297f6e442446d70238f4b56f38a798a
2021-10-25 11:08:44 +00:00
Suphon Thanakornpakapong
47a10063f0 Theme ui elements using accent color palette 2021-10-14 23:57:17 +07:00
Patryk Michalik
a4fc3b8a78 Add ability to customize opacity of folder icon backgrounds 2021-10-14 13:31:45 +02:00
Suphon Thanakornpakapong
a463238dbd Fix more errors 2021-10-07 09:42:24 +07:00
Jon Miranda
b77878ebe3 Update folder preview and folder background colors.
Bug: 201332301
Test: light theme / dark theme
      open and close folder, ensure colors are accurate

Change-Id: I49198eb2faee03111be33051fd1cb08094844c77
2021-10-06 16:57:33 -07:00
Thales Lima
9a6b20f0cb Merge "launcher: create more space options" into sc-v2-dev 2021-10-05 15:38:57 +00:00
Thales Lima
78d00adcbe launcher: create more space options
The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.

Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
2021-10-05 12:26:05 +01:00
Suphon Thanakornpakapong
cc2bd15873 Merge remote-tracking branch 'aosp/android12-release' into 12-dev 2021-10-05 14:13:08 +07:00
sfufa@google.com
b0ec41285b [Search] Avoiding hiding keyboard when clearing search text
Bug: 199555357
Test: manual
Change-Id: I7bc9b7097427aed3b526c8d75956d323e819e79b
2021-10-04 14:23:14 -07:00
TreeHugger Robot
eb5f5f7807 Merge "Disable FolderNameEditText on Taskbar" into sc-v2-dev 2021-09-03 23:00:33 +00:00
Tony Wickham
d345751849 Disable FolderNameEditText on Taskbar
Test: Can rename folder on home screen, but tapping folder name in taskbar does nothing
Bug: 180051157
Change-Id: Ief19805683f754995baf24d7f41f3979841d5bd3
2021-09-03 12:50:15 -07: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
Sunny Goyal
69a8eecdc9 Simplifying color extraction registration logic
> Calulating correct location irrespective of transient
  state (scale/translation)
> Removing extraction pause/resume logic
> Simplifying location calculation and registration (only use one location instead of a list)

Bug: 194732483
Test: Manual
Change-Id: I255d83761bff5e09c9fb0a5e398d0be0c1d0956f
2021-07-28 15:43:13 -07:00
Jonathan Miranda
c2a49ee2bc resolve merge conflicts of 46378eb881 to sc-v2-dev
Folder icon polish.

- Increase the overlap between the preview items and the background
  so that it appears more intentional (lots of reports of users
  thinking that its a bug)
- Fix bug where clip path was still clipping icons when
  dragging and swiping to home.

Bug: 194339057
Bug: 193701705
Bug: 191225536
Test: test 2 icon, 3 icon, and 4 icon folders
      close folder on 2nd page, ensure clipping
      ensure no preview items are clipped in drag view
      ensure no preview items are clipped in swipe up to home
      test 2x2, 3x3, 4x4, 4x5, and 5x5 grids to ensure no clipping
      of folder icons
      drag and drop folder in and out of hotseat
      create folders (2 icon, 3 icon, 4 icon)

Change-Id: I09ce9ef59e340b1009de3d26eed430a0a8dc4b33
Merged-In: Id49bae33438e10248bef05450d7e2c92c2140748
2021-07-22 00:43:27 +00:00
Jon Miranda
92c1b5d3ab Folder icon polish.
- Increase the overlap between the preview items and the background
  so that it appears more intentional (lots of reports of users
  thinking that its a bug)
- Fix bug where clip path was still clipping icons when
  dragging and swiping to home.

Bug: 193701705
Bug: 191225536
Test: test 2 icon, 3 icon, and 4 icon folders
      close folder on 2nd page, ensure clipping
      ensure no preview items are clipped in drag view
      ensure no preview items are clipped in swipe up to home
      test 2x2, 3x3, 4x4, 4x5, and 5x5 grids to ensure no clipping
      of folder icons
      drag and drop folder in and out of hotseat
      create folders (2 icon, 3 icon, 4 icon)

Merged-In: Id49bae33438e10248bef05450d7e2c92c2140748
Change-Id: Ic3708bd402704f0a6f57ae5315ef602e2bbc6d82
2021-07-20 22:16:21 +00:00
Sunny Goyal
711c596c86 Binding Taskbar directly from Launcher model
This allows taskbar to be loaded even in case of 3P Launchers
and removes dependency on LauncherActivity lifecycle

Bug: 187353581
Bug: 188788621
Test: Manual
Change-Id: I5a0988e0697b41677d4c58f0213aef14ec0c0972
2021-07-15 12:43:11 -07:00
Jonathan Miranda
aa560506ba Merge "Cancel existing preview item animation during non-animated update." into sc-dev am: 81501a563c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15164771

Change-Id: I667763f65219cf259b8cf0db929d7dc0c848163e
2021-07-01 18:36:16 +00:00
Jon Miranda
2cc33ed29a Cancel existing preview item animation during non-animated update.
Otherwise we end up in a bad folder icon state.

Bug: 191227370
Test: Drag icon out of folder bounds,
      Suddenly drop it so its forced to go back to the folder
      Close folder before the animation finishes

Change-Id: Ib751a8209d66c5e9772731fdc1d7f365ae47531a
2021-06-30 17:59:17 -07:00
Jonathan Miranda
ca670425a8 Merge "Fix folder icon text alignment." into sc-dev am: 48dbfcd1c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15111651

Change-Id: I17cf64b9aa733dbe045626d66b287cbe085edbf5
2021-06-26 15:10:14 +00:00
Jon Miranda
2be425b6b0 Fix folder icon text alignment.
- We set the parent view padding to be cellYPadding, so we no longer need to
  account for it when setting the text LayoutParams.

Bug: 191954558
Test: grid where scalableGrid=true and scalableGrid=false (4x5, and 5x5)
Change-Id: I8d7578b2589f801ceef229b663446d868d135ad0
2021-06-25 10:33:20 -07:00
Jonathan Miranda
9bf19c1d7f Merge "Polish folder icon bugs." into sc-dev am: 835fab2305
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15046894

Change-Id: Id5684eeab5e56461eeeb60e23c37221afeb2b4dc
2021-06-22 22:22:56 +00:00
Jon Miranda
fa1e14c4b8 Polish folder icon bugs.
- Fix bug where folders are misaligned.
- Fix bug when closing on 2nd page of large folder.

Bug: 184822585
Test: drag folder originally in hotseat to workspace, vice versa
      test on grid where isScalable=true and isScalable=false

Change-Id: I08a79b8d280df3e3974baaa07e80db6bc4165e58
2021-06-22 11:12:47 -07:00
Suphon Thanakornpakapong
05cacb3664 Use setAlphaComponent instead of creating new color 2021-06-19 20:47:22 +07:00
Patryk Michalik
d22ac8db2c Annotate EditTextExtensions functions with @JvmStatic 2021-06-19 11:52:50 +02:00
Patryk Michalik
e1556b6c51 Use custom accent colour for FolderNameEditText in folders 2021-06-19 11:47:26 +02:00
Samuel Fufa
ab4fb243b7 Merge "Refactor FolderInsetAnimationCallback to be used with any view" into sc-dev am: efa5df380c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15002979

Change-Id: I71867324537972713cb4660a70f20a4d06b5a012
2021-06-17 18:50:23 +00:00
Samuel Fufa
efa5df380c Merge "Refactor FolderInsetAnimationCallback to be used with any view" into sc-dev 2021-06-17 18:48:49 +00:00
Jonathan Miranda
b94b6e0d3c resolve merge conflicts of 0bf000104f to sc-v2-dev
Bug: 175329686
Change-Id: I48e3f6a20c27c8c7aeef5da7a464a6c4a5e4180c
Test: create folder / add items to folder
Merged-In: Iaab592410734b0b5239dbbddbb9b2ed5a9f5d8b0
2021-06-16 23:46:53 +00:00
Sunny Goyal
0c299cb324 Merge "Simplifying the drop animation code" into sc-v2-dev 2021-06-16 23:18:16 +00:00
Samuel Fufa
d04a92d1ed Refactor FolderInsetAnimationCallback to be used with any view
- Update ic_corp_off icon to outline
- Remove shadow from work toggle
- Translate work fab when keyboard is shown

Screenshot: https://screenshot.googleplex.com/593tEg7bE4kSS4y

Bug: 191251404
Bug: 191250785
Test: local
Change-Id: Ie7dddfd17eb90575a1e1f67e281070dd8d268f8d
2021-06-16 17:25:53 -05:00
Jon Miranda
9d41499a33 Fix bug where preview item icon fades/disappears for a frame during
- Remove fade since we no longer clip icons.
- Ensures a clean handoff between drag view and folder icon preview item.

Bug: 175329686
Test: create folder / add items to folder
Change-Id: Iaab592410734b0b5239dbbddbb9b2ed5a9f5d8b0
2021-06-15 21:14:47 +00:00
Jon Miranda
5688010306 Folder polish - update color extraction, fix contrast issues.
- Also fixes open/close animation when items were not getting clipped
  due to folder not being measured yet.

Bug: 190210234
Bug: 190164147
Test: manual
Change-Id: I230c33d7e4e1871d8d702737c56c79ce46504b8f
Merged-In: I230c33d7e4e1871d8d702737c56c79ce46504b8f
2021-06-14 17:54:19 +00:00
Jon Miranda
f564b65f2a Folder preview polish.
- Fixes notification dot not aligning in 4x5 grid
- Fixes clipping issues with large folders
- Fixes clipping issues with preview item animations

Bug: 188095988
Test: manual

Change-Id: I6821b3cb3c65e5928c7be1cddd7f292a37842698
2021-06-09 10:04:39 -07:00
Sunny Goyal
1721ccf385 Simplifying the drop animation code
> Removing some unused parameters

Bug: 190524398
Test: Manual
Change-Id: Iea0c2e7a9d30a10fd7443ea57992c59ea60badf8
2021-06-08 14:43:57 -07:00
Jon Miranda
e41dd483e6 New folder icon style (uncropped icons).
- Switch Circle to PathShape as it allows for more flexibility on
  choosing what gets cropped.
- Remove shadows, and stroke.

Bug: 188095988
Test: manual
Change-Id: I602b3efcd35c2c11dc3461f49099c2f2a56eae59
2021-06-04 18:32:10 -07:00
Jon Miranda
de907805d1 Change folderFillColor to colorBackgroundFloating.
There seems to be some nuance that prevents me from defining it once in
the base theme, so just updated all of them individually to prevent
any edge case from slipping through.

Bug: 188095988
Test: manual
Change-Id: I1dea639f174fa4ec09bda93a6e2017993b2007a5
2021-05-28 01:21:21 +00:00
Jon Miranda
e3104682fb Folder polish
- Update folder hint text to ensure enough contrast.
- Clamp down on alpha when animating to local color extraction
- Update colors to new spec.

Bug: 179209484
Bug: 175329686
Test: manual
Change-Id: I9471504e10f02630ae13b2c478ced1ee05bd5220
2021-05-19 14:03:09 +00:00
Jon Miranda
7bbd03160f Fix contrast issue with folder background and text colors.
Bug: 187797251
Test: dark wallpaper, light wallpaper, toggle dark theme on both
Change-Id: I57ddfc91878d68735d5ae5ec5ab78222fda101ca
2021-05-11 17:01:53 -07:00
Sunny Goyal
5996937798 Removing Launcher dependency from Folders
This allows opening/closing folders without a Launcher context

Bug: 187353581
Test: Manual
Change-Id: Id73a40445a23004eb554f0422d286aa0ff6b3c41
2021-05-10 14:01:43 -07:00
Jon Miranda
0b6fa71deb Add local wallpaper color extraction to folder backgrounds.
- Starts listening to local wallpaper colors as soon as folder
  is positioned.
- The folder open animation already has a background color
  animator.
- For simplicity, folder open animation always starts
  first, and then we cancel its background color animator,
  and start a new animator to the extracted color.
- setAutoCancel would be handy here, but it does not work, will
  track in a separate bug.
- Since folders are reused, we clear our the color extractor on
  folder close.

Bug: 175329686
Test: multiple folders on rainbow background
      open each folder, ensure bg animates to proper color
Change-Id: Ie0f2c0632fa2361f7710ba247d74f882620dec16
2021-05-07 16:16:36 -07:00