diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-09-11 20:16:19 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-09-11 20:16:19 +0000 |
commit | 791dd73217992d8254e4e7ecc264b968b75269ae (patch) | |
tree | f9a86cb7bfa309ab9d46a3d1290f1922da27eb69 /quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java | |
parent | 5e742772d0a5f00238a0d3694f2b6e28b0c88a6d (diff) | |
parent | 3600fb7777921b24d39c34942c96553b669d73b7 (diff) | |
download | packages_apps_Trebuchet-791dd73217992d8254e4e7ecc264b968b75269ae.tar.gz packages_apps_Trebuchet-791dd73217992d8254e4e7ecc264b968b75269ae.tar.bz2 packages_apps_Trebuchet-791dd73217992d8254e4e7ecc264b968b75269ae.zip |
Merge "Adding support for building a "spring like animation" with precomputed values" into ub-launcher3-qt-qpr1-dev
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java')
-rw-r--r-- | quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java index 371161ebd..711594386 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java @@ -18,16 +18,11 @@ package com.android.launcher3; import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X; import static com.android.launcher3.LauncherState.NORMAL; -import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS; import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.quickstep.TaskViewUtils.findTaskViewToLaunch; import static com.android.quickstep.TaskViewUtils.getRecentsWindowAnimator; -import static androidx.dynamicanimation.animation.DynamicAnimation.MIN_VISIBLE_CHANGE_PIXELS; -import static androidx.dynamicanimation.animation.SpringForce.DAMPING_RATIO_MEDIUM_BOUNCY; -import static androidx.dynamicanimation.animation.SpringForce.STIFFNESS_MEDIUM; - import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; @@ -35,18 +30,17 @@ import android.animation.ObjectAnimator; import android.content.Context; import android.view.View; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; -import com.android.launcher3.anim.SpringObjectAnimator; +import com.android.launcher3.anim.SpringAnimationBuilder; import com.android.quickstep.util.ClipAnimationHelper; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + /** * A {@link QuickstepAppTransitionManagerImpl} that also implements recents transitions from * {@link RecentsView}. @@ -156,8 +150,11 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti return ObjectAnimator.ofFloat(mLauncher.getOverviewPanel(), RecentsView.CONTENT_ALPHA, values); case INDEX_RECENTS_TRANSLATE_X_ANIM: - return new SpringObjectAnimator<>(mLauncher.getOverviewPanel(), - VIEW_TRANSLATE_X, MIN_VISIBLE_CHANGE_PIXELS, 0.8f, 250, values); + return new SpringAnimationBuilder<>(mLauncher.getOverviewPanel(), VIEW_TRANSLATE_X) + .setDampingRatio(0.8f) + .setStiffness(250) + .setValues(values) + .build(mLauncher); default: return super.createStateElementAnimation(index, values); } |