All apps motion tuning [1/n]

- reverse spring direction to enable overshoot
- change master interpolators for swipe / fling

Test: manual
Bug: 183001675
Bug: 186121789
Change-Id: I5869d84daab99594cc2a261cb8f5d28e0293afe1
This commit is contained in:
Hyunyoung Song
2021-05-04 09:08:09 -07:00
parent cff951ab18
commit 96d4ec4544
2 changed files with 10 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ import com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip.OnActivePag
public class AllAppsContainerView extends SpringRelativeLayout implements DragSource,
Insettable, OnDeviceProfileChangeListener, OnActivePageChangedListener {
private static final float FLING_VELOCITY_MULTIPLIER = 1800f;
private static final float FLING_VELOCITY_MULTIPLIER = 1000f;
// Starts the springs after at least 25% of the animation has passed.
private static final float FLING_ANIMATION_THRESHOLD = 0.25f;
@@ -611,7 +611,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
public void onAnimationUpdate(ValueAnimator valueAnimator) {
if (shouldSpring
&& valueAnimator.getAnimatedFraction() >= FLING_ANIMATION_THRESHOLD) {
absorbSwipeUpVelocity(-Math.abs(
absorbSwipeUpVelocity(Math.abs(
Math.round(velocity * FLING_VELOCITY_MULTIPLIER)));
shouldSpring = false;
}