Apply spring forces to animate to the final position for swipe home
Now instead of an incorrect hack that simulated accelerating to the target, we actually apply spring forces to make it feel realistic and work no matter where the target is. Added two helper classes for this: - FlingSpringAnim handles the fling, applying friction until reaching the target, then a spring to pull towards the final position (also applies if fling wasn't in the right direction or strong enough to reach the target). - RectFSpringAnim uses 2 FlingSpringAnims (x + y) to animate from a starting rect to a target rect. It also has an animation to scale from the start rect to the target rect, sending progress update callbacks to the caller. Bug: 123900446 Change-Id: Iafa89db1d55c42816acfa9f1bb84a7519b69ff12
Loading
Please register or sign in to comment