Commit Graph

3 Commits

Author SHA1 Message Date
Sunny Goyal 0ee66478c6 Adding CannedAnimationCoordinator to enable running a predefined animation in Launcher
> The coordinator takes care of recreating animations on layout changes and
   linking it with state animation
> This also ensures that there is only one animation playing at a time

Bug: 293464892
Test: Verified that calling with multiple animations cancels previos call
Flag: None
Change-Id: Iab161720c94843b5834734da78167344c17539c8
2023-08-21 12:55:42 -07:00
Nicolo' Mazzucato 5765d42ada Fix jump in animation for hotseat while re-arranging icons
While re-arranging icons the hotseat remains in scale 1.0f, while the workspace reduces it's scale (as defined by SpringLoadedState.java). Previously, the code to aggregate animations was assuming hotseat and workspace always had the same scale.

MultiScaleProperty.get() was being used to set the starting value of the animation. Previously, it was returning the last aggregated value. However, this value was correct only for the workspace, but not for the hotseat. Returning the current view scale makes it always correct.

Bug: 220271046
Test: Dragged icons from hotseat to workspace, and verified animation didn't jump
Change-Id: Ic01776c1d8e3967624626ed7c44d194a06295790
2022-02-22 18:27:26 +01:00
Nicolo' Mazzucato 12131a40fe Add Z scaling during unfold to launcher
The unfold progresses are mapped to 0.85 - 1 range and set as a scale for launcher.

In case of multiple scale animations for workspace and hotseat, they are combined using MultiScaleProperty (e.g. opening an app while unfolding/going to all apps while unfolding). Note that this is a pretty difficult scenario to be in. If that happens, we multiply all values and bound the result between the max and min values.

Bug: 217368525
Test: atest MultiScalePropertyTest and manually
Change-Id: I6131c39f36deade0b7280c72edda2d72045344e9
2022-02-15 17:02:36 +01:00