diff options
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsTransitionController.java')
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsTransitionController.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index edfe0c15e..743b16ef1 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -7,6 +7,7 @@ import android.animation.AnimatorSet; import android.animation.ArgbEvaluator; import android.animation.ObjectAnimator; import android.graphics.Color; +import android.support.animation.SpringAnimation; import android.support.v4.graphics.ColorUtils; import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.view.MotionEvent; @@ -98,9 +99,10 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect // Used in discovery bounce animation to provide the transition without workspace changing. private boolean mIsTranslateWithoutWorkspace = false; - private AnimatorSet mDiscoBounceAnimation; + private Animator mDiscoBounceAnimation; private GradientView mGradientView; + private SpringAnimation mSearchSpring; private SpringAnimationHandler mSpringAnimationHandler; public AllAppsTransitionController(Launcher l) { @@ -226,6 +228,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect } mLauncher.showAppsView(true /* animated */, false /* updatePredictedApps */); if (hasSpringAnimationHandler()) { + mSpringAnimationHandler.add(mSearchSpring, true /* setDefaultValues */); // The icons are moving upwards, so we go to 0 from 1. (y-axis 1 is below 0.) mSpringAnimationHandler.animateToFinalPosition(0 /* pos */, 1 /* startValue */); } @@ -418,8 +421,8 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect cancelDiscoveryAnimation(); // assumption is that this variable is always null - mDiscoBounceAnimation = (AnimatorSet) AnimatorInflater.loadAnimator(mLauncher, - R.anim.discovery_bounce); + mDiscoBounceAnimation = AnimatorInflater.loadAnimator(mLauncher, + R.animator.discovery_bounce); mDiscoBounceAnimation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animator) { @@ -499,6 +502,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect public void finishPullUp() { mHotseat.setVisibility(View.INVISIBLE); if (hasSpringAnimationHandler()) { + mSpringAnimationHandler.remove(mSearchSpring); mSpringAnimationHandler.reset(); } setProgress(0f); @@ -544,6 +548,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect mWorkspace.getPageIndicator().getCaretDrawable(), mLauncher); mAppsView.getSearchUiManager().addOnScrollRangeChangeListener(this); mSpringAnimationHandler = mAppsView.getSpringAnimationHandler(); + mSearchSpring = mAppsView.getSearchUiManager().getSpringForFling(); } private boolean hasSpringAnimationHandler() { |