Commit Graph

8 Commits

Author SHA1 Message Date
Kateryna Ivanova
7120373bbc Migrate Interpolators from Launcher3 to the public animation library
Test: atest
Bug: 271850966
Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
2023-05-30 07:20:38 +00:00
Jon Miranda
f23e2d1e16 Keep foreground drawable centered during app open/close animation.
For apps that use AdaptiveIcon, we used to animate the foreground
drawable independently from the background. This is sometimes
perceived as jank so we remove the animation since it is very subtle
in the best case scenario.

Bug: 268026344
Test: open/close apps/folders that use AdaptiveIcons
Change-Id: I500bf56e04823757d511d909a93d3b30703249a1
2023-03-20 16:13:02 +00:00
Jon Miranda
39334f4013 Allow icons to take up full width in all cases where width > height.
Previously we only let the icons take up the max width if the
device was in vertical bar layout. For tablets this meant
that the icons would be smaller than the actual window crop.

We want the full width in any cases where the profile width
is greater than the height, so created a new method to check for that.

Bug: 203157974
Test: phone/tablet in portrait/landscape
Change-Id: I467f142bac87ec7c3b369c01f8d9c96ddf74fc76
2022-03-07 18:17:50 -08:00
Jon Miranda
c9ad2dd6c7 Add new app close implementation.
- We remove the fling completely
- We set damping to 1 for x/y springs so there is no
  bounciness, and updated the stiffness and bounds to tighten
  up the path to the final location.
- During the animation, we translate all launcher content
  down
- When the x/y springs, and rect animator all finish,
  we use a spring to bounce the launcher content back up

- Added AppCloseConfig so that the entire animation can
  be defined in one location, with getter methods so that
  all the involved parties of the animation can access the
  current value.
- The animations are all defined linearly, and then
  interpolated over using a 3 point curve.

Building behind feature flag as we tune the values.

Bug: 173107751
Test: manual, visual
Change-Id: I83ad0fa2c4234cf30004240d43e191354595adc8
2021-04-22 16:11:11 -04:00
Jon Miranda
8f09aa3438 Fix IllegalArgumentException for Float.NaN in ClipIconView.
Bug: 173703326
Test: not able to repo bug but this prevents the code from
      executing in bad case
Change-Id: I3701c040e72e6ce37a624b10bb82b2200935e283
2021-01-22 17:49:36 -05:00
Sunny Goyal
6fd105b69a Updating gesture tutorial home animation
> Using a separate View as icon, instead of the taskView
> Updating swipe animation logic to abstract out FloatingIconView dependency

Change-Id: Ib466262afead11ebe4ca035d589f0382c37e3e97
2020-07-09 07:51:34 -07:00
Jon Miranda
b133a52e86 Fix app open/close animation in landscape.
When we refactored ClipIconView, we never init mIsVerticalBarLayout.
Instead we pass it in along with the rest of the info from FloatingIconView.

Bug: 155039118
Change-Id: Iff93105c512a8e6478dc49d8ab9100fd129af48c
2020-04-30 22:50:59 -07:00
Jon Miranda
4848604882 Polish badge animation on app open/close.
Create new ClipIconView so that the adaptive icon foreground/background can
get clipped properly, and the badge gets drawn separately on top of it.

Bug: 142105172

Change-Id: Ie5d65c20f845d9219fd01daa383f273dde0e096c
2020-03-23 12:24:04 -07:00