Continue scaling down recents past final position in 0 button mode

- Previously, we clamped the progress to 1 when reaching mTransitionDragLength.
  Now, we allow dragging all the way to the top of the screen, and store this
  new top progress in mDragLengthFactor (> 1f).
- Because the launcher animation controller is inherently bound to a progress
  between 0 and 1, we have to do a bit of trickery involving interpolators.
  Specifically, we normalize the progress to 0 to 1 by dividing by
  mDragLengthFactor, but then we set the interpolators to multiply their
  progress by mDragLengthFactor. The result is that the animation progress
  appears to go from 0 to mDragLengthFactor, just like the window progress.
- To avoid scaling too small, we start interpolating the progress at a certain
  point, ending at a specified max progress when reaching the top of the screen.

Bug: 131741395
Change-Id: Ie8b4b56d37249cd1456f93c110c26c78fe052dc0
This commit is contained in:
Tony authored and Tony Wickham committed 2019-05-28 21:41:43 +00:00
1 parent ebd5e88164
commit bef6a44e7b
5 files changed
+70 -13

No files matched your search

@@ -118,6 +118,8 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
void createActivityController(long transitionLength);
default void adjustActivityControllerInterpolators() { }
default void onTransitionCancelled() { }
default void setShelfState(ShelfAnimState animState, Interpolator interpolator,