Commit Graph

14 Commits

Author SHA1 Message Date
Andy Wickham
16a024df71 Adds Blur and BlurFallback styles for All Apps.
Technically these styles can be used throughout Launcher, e.g.
Widget Picker and Folders, but this CL only applies it to All Apps.

At a high level, views wishing to apply transparency to show blur
should use these new attr values rather than colors directly.

When blur changes, e.g. starting or stopping battery saver, the
style is re-applied and revelant views are invalidated. For
Launcher, this is handled by DepthController, and for Taskbar it's
handled by a CrossWindowBlurListener.

Also updated the Private Space animation slightly to account for
the translucent decorators (specifically, we can't use the mask
view to cover them when blur is enabled).

Screenshots: https://drive.google.com/drive/folders/1tU472KHotgEBpT-Ec9VOBWPBf_YdVqv2?resourcekey=0-ebf7W8O6iDJ4UVMtRzTABg&usp=sharing
Private Space animations: https://drive.google.com/file/d/1h5pn8Xb17TPcbujr7uSAJNTq8kwNZoIp/view?usp=drive_link&resourcekey=0-TzpaJ16Gg8_QJctBx4oiIg
Private Space QS Tile animations: https://drive.google.com/file/d/1dCuqnqd5z2kSBEakGobMlEkMwFDBWRbJ/view?usp=drive_link&resourcekey=0-qRVFPb-a6OzaZQOf4x86Jw

Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ia9f581f50d1adc0830569656bdeb751deb710a9c
2025-04-15 16:42:56 -07:00
Brandon Dayauon
8af853ab60 Change A-Z font to GSF for app icons and PS header
Used com.android.launcher3.gsf_res flag to control font changes in
launcher. Tested font changes manually only to App icons, PS header, and
PS lock text.

bug:393609630
Test: manually:
AA and flag Off: https://hsv.googleplex.com/6005345892696064
AA and flag On: https://hsv.googleplex.com/5713302612082688
AA and flag Off w/ TwoLine: https://hsv.googleplex.com/6604407931142144
AA and flag On w/ TwoLine: https://hsv.googleplex.com/5006326877913088
PS and flag off: https://hsv.googleplex.com/6253491923189760
PS and flag on: https://hsv.googleplex.com/4909373317971968
Flag: com.android.launcher3.gsf_res

Change-Id: Icae71ae648340ac566a908648eae14985b6aa4d3
2025-03-18 22:24:48 +00:00
Marcelo Arteiro
bc02103a6a Migrate materialColor* attributes into colors
TLDR:
* This change should not break anything or change any color.
* Simplifies theming and styling while improving developer experience.
* With this  developers can often skip styling for color entirely, while ensuring consistency and preventing accidental overrides.

Bug: 374273611
Test: presubmit
Flag: EXEMPT bugfix
Change-Id: Id19038078e83c73847b1a7c686c3a3df1ecccac2
2024-11-21 13:08:11 +00:00
Brandon Dayauon
4f7d4c2975 Set maxLines for private space header to 1.
This is an issue for large font/display that in the arabic language will clip the Private text.

bug: 357942579
Test manually: https://drive.google.com/file/d/1FFZpXmfwKlRG7mvmSCtc1dtjwUjuXjfW/view?usp=sharing
Flag: NONE bugix

Change-Id: I22943237e10b502edb6aae6845fbe6027fda1323
2024-08-14 13:47:37 -07:00
Marcelo Arteiro
f38d98d1a6 Align color resources in launcher projects.
This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
2024-07-19 14:22:21 +00:00
Brandon Dayauon
0e5640376e Remove enableLayoutTransitions for private space.
Get rid of layoutTransitions as they are not reliable, see here: https://docs.google.com/document/d/1ExSemBvzzVv-I9tUCVzdLeN-lDb2hTSOM886UYSH-Qk/edit?usp=sharing&resourcekey=0-aBCCLnrB7KtkhIeyUOkKyw
Instead use actual animatorSet to do the animating.
- This also fixes the timings so that the pill transition happens at the same time of the icon alpha animation.
Made member variable for lockText and settingButton.

bug:346298256
Test:
before: See bug
after manually- video: https://drive.google.com/file/d/1B7PIgrGWMJTphc1b5CvCkyg-QYx3TTN3/view?usp=sharing
Flag: com.android.launcher3.enable_private_space

Change-Id: I049b84dbe1279a0becb090db8660975dc5c5961e
2024-07-17 10:35:53 -07:00
Brandon Dayauon
736527a127 Make PrivateSpaceSettingsButton instead of having just the imageView.
This way we can keep the click listener in this PrivateSpaceSettingsButton.java class.
- Moved itemInfo creation to PrivateSpaceSettingsButton and created a test class

bug: 341053089
Test: manually - presubmit video: https://drive.google.com/file/d/1_TCGrILvwmMpxbgIcbOcpB2AxeBJbyNf/view?usp=sharing
Flag: Aconfig com.android.launcher3.enable_private_space Nextfood
Change-Id: I79cd319274f4445dd00bc257be81728360d09684
2024-05-31 17:05:13 -07:00
Himanshu Gupta
42e3196011 Fix Accessbility bugs for PS.
This Cl contains:
1. Alt text for Lock/Unlock button as per state.
2. Alt text for Header when Locked.
3. Removing Header from accessibility target when unlocked.

Bug: 328024119
Test: Manual
Flag: NA
Change-Id: I791176afdae4fc6eb9387080aa036c1aed2a03a9
2024-04-25 11:57:53 +01:00
Himanshu Gupta
faafb3a19a Fix horizontal spacing in PS Header
1. Removes padding between settings cog and lock button,
as the insets already provide the required padding.
2. Reduces the lock button margin from left to accomodate
the inbuilt inset in the button.

Fix: 336510036
Test: Verified on device.
Flag: NA
Change-Id: I077097c7beb2cc8fe14f4367c66ca4e1ad4270d0
2024-04-23 15:28:01 +01:00
Brandon Dayauon
cf0ae01a51 Private space header to support RTL
bug:335658774
Test manually:
before: https://drive.google.com/file/d/1N8kFl28OhCJ7kTTo8VK74x-Mvaqi8GJ4/view?usp=sharing
after:https://drive.google.com/file/d/1N6AyVXcOSA48NveklIeqypueu7WLfP0V/view?usp=sharing
Flag: ACONFIG com.android.launcher3.enable_private_space TRUNKFOOD

Change-Id: I1c80e33f84251d42cd5821735457548de41db40d
2024-04-18 09:50:39 -07:00
Brandon Dayauon
136f9d6f8a Move adding views logic to privateProfileManager
- Have the animation happen according to the state of private space.
- Have the transition happen only once by setting the current transition to null at the end of transition and by ensuring
where the transitions are allowed.
- Removing controller class.

- The onClick controls the enablement of the profile. On reset (when getting the transition) is what controls the animation
during expand.

tldr- In the collapse case:  execute() is called -> animation happens  -> addPsHeader
tldr- Expand case: post() is called -> addPsHeader -> animation happens.

Collapse:
onClick() -> AACV.onAppsUpdated() that resets & apply/RUNS runnable because EXECUTE
-> AAList.onAppsUpdated() (which is called at the same time animating happens which we should cancel and do at end callback)
-> AAList.onAppsUpdated() gets called again

Expand:
onCLick() -> AACV.onAppsUpdated() that resets & apply runnable
-> AAList.onAppsUpdated() (no animation running)
-> AAList.onAppsUpdated() (no animation running)
-> addPrivateSpaceHeader
-> then unlockAction() runnable because its posted at this point

bug: 326206132
bug: 330444548
bug: 299294792
Test: manually locally and presubmit: https://screenshot.googleplex.com/9wavvwKQ8hY6oUw & https://screenshot.googleplex.com/BiqmidLFjPwS28j
video: https://drive.google.com/file/d/1XGhmTncdUFtJj188_l7alGyyNz_fhXNw/view?usp=sharing

Scrolling fix before: https://drive.google.com/file/d/1XykDm4UELoCvcwZdj8ZlJ6TszptB8W0W/view?usp=sharing
scrolling fix after when not a lot of apps: https://drive.google.com/file/d/1Y4VY1eX7WE8ShSLXRrT56ieBdAuJo_zn/view?usp=sharing
scrolling fix after with a lot of apps: https://drive.google.com/file/d/1Y58c-Z9xnU1GILp0Ih-oLORXYkMB-jWn/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation

Change-Id: I8d03ae60e2c9fe0ec145c4b0a2e9604b9e6e9017
2024-03-28 17:39:42 -07:00
Himanshu Gupta
07ebb705d6 Fixing Layout height for Private Space container
Screenshot at max Font, max Display Size:
Before:  https://screenshot.googleplex.com/BwtrU5xE5h63RKZ.png
After: https://photos.app.goo.gl/RXTvE6rM6PUx9wRK7

Bug: 311343337
Change-Id: I565c0c430b56e14f0fb1863b37c835c59c032730
Test: Manual
2024-03-03 21:14:16 +00:00
Brandon Dayauon
08b06523a5 Collapse private space container and animate header.
- Just opposite of how it will expand.
- RecyclerView.SmoothScroller is needed to scroll the container.

- Need to separate the lock button because this way I can use animateLayout changes and it itself was its own drawable. Separated into icon and textView in a viewGroup.
- Give the background the 10padding on the left and right so that when in animation, the icon can adjust the padding/margins there.
- Using propertySetter to set animation
- Animates the alpha of the settings alpha

- updated test to account for the nested child views the test needs to inspect

bug: 299294792
test: manual:
Expand + Collapse Video: https://drive.google.com/file/d/1Og66eqmXv3THn0wO4_x6Tfp2AbwFWUwZ/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation TEAMFOOD

Change-Id: I96f1d172a481522d23b4cee996ddec65961fce78
2024-02-16 21:23:51 -08:00
Himanshu Gupta
08badb3f6f Adding Private Space views to Launcher.
This CL adds the following:
* Static View Elements to be added to AllApps recycler View
* View Controller to load the above elements dynamically
* Private Space Section Decorator
* PrivateProfile Manager containing the logic related to Private Space
* Abstract UserProfileManager as the super class of Work/Private
ProfileManager

Private Space Views Figma
[link](https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?type=design&node-id=14535-111985&mode=design&t=JLz9W0O551TpzQYH-0)

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I8aa4247c78064a551e5e0d0b46d3fc033873f99d
2023-11-14 11:58:16 +00:00