diff --git a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
index ba4fbe0..1f60fcc 100644
--- a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
+++ b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
@@ -448,9 +448,20 @@
                 row = Math.abs(numTotalRows - row);
             }
 
-            // We manipulate the stiffness, min, and max values based on the items distance to the
-            // first row and the items distance to the center column to create the ^-shaped motion
-            // effect.
+            calculateSpringValues(spring, row, col);
+        }
+
+        @Override
+        public void setDefaultValues(SpringAnimation spring) {
+            calculateSpringValues(spring, 0, mAppsPerRow / 2);
+        }
+
+        /**
+         * We manipulate the stiffness, min, and max values based on the items distance to the
+         * first row and the items distance to the center column to create the ^-shaped motion
+         * effect.
+         */
+        private void calculateSpringValues(SpringAnimation spring, int row, int col) {
             float rowFactor = (1 + row) * 0.5f;
             float colFactor = getColumnFactor(col, mAppsPerRow);
 
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index edfe0c1..a1f2dd7 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -7,6 +7,7 @@
 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;
@@ -101,6 +102,7 @@
     private AnimatorSet mDiscoBounceAnimation;
     private GradientView mGradientView;
 
+    private SpringAnimation mSearchSpring;
     private SpringAnimationHandler mSpringAnimationHandler;
 
     public AllAppsTransitionController(Launcher l) {
@@ -226,6 +228,7 @@
                 }
                 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 */);
                 }
@@ -499,6 +502,7 @@
     public void finishPullUp() {
         mHotseat.setVisibility(View.INVISIBLE);
         if (hasSpringAnimationHandler()) {
+            mSpringAnimationHandler.remove(mSearchSpring);
             mSpringAnimationHandler.reset();
         }
         setProgress(0f);
@@ -544,6 +548,7 @@
                 mWorkspace.getPageIndicator().getCaretDrawable(), mLauncher);
         mAppsView.getSearchUiManager().addOnScrollRangeChangeListener(this);
         mSpringAnimationHandler = mAppsView.getSpringAnimationHandler();
+        mSearchSpring = mAppsView.getSearchUiManager().getSpringForFling();
     }
 
     private boolean hasSpringAnimationHandler() {
diff --git a/src/com/android/launcher3/allapps/SearchUiManager.java b/src/com/android/launcher3/allapps/SearchUiManager.java
index c0d7850..34230e0 100644
--- a/src/com/android/launcher3/allapps/SearchUiManager.java
+++ b/src/com/android/launcher3/allapps/SearchUiManager.java
@@ -15,6 +15,8 @@
  */
 package com.android.launcher3.allapps;
 
+import android.support.animation.SpringAnimation;
+import android.support.annotation.NonNull;
 import android.view.KeyEvent;
 
 /**
@@ -28,6 +30,11 @@
     void initialize(AlphabeticalAppsList appsList, AllAppsRecyclerView recyclerView);
 
     /**
+     * A {@link SpringAnimation} that will be used when the user flings.
+     */
+    @NonNull SpringAnimation getSpringForFling();
+
+    /**
      * Notifies the search manager that the apps-list has changed and the search UI should be
      * updated accordingly.
      */
diff --git a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
index d504551..ddf6e58 100644
--- a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
+++ b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
@@ -17,6 +17,9 @@
 
 import android.content.Context;
 import android.graphics.Rect;
+import android.support.animation.FloatValueHolder;
+import android.support.animation.SpringAnimation;
+import android.support.animation.SpringForce;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.text.Selection;
@@ -62,6 +65,8 @@
     private View mDivider;
     private HeaderElevationController mElevationController;
 
+    private SpringAnimation mSpring;
+
     public AppsSearchContainerLayout(Context context) {
         this(context, null);
     }
@@ -81,6 +86,9 @@
 
         mSearchQueryBuilder = new SpannableStringBuilder();
         Selection.setSelection(mSearchQueryBuilder, 0);
+
+        // Note: This spring does nothing.
+        mSpring = new SpringAnimation(new FloatValueHolder()).setSpring(new SpringForce(0));
     }
 
     @Override
@@ -127,6 +135,11 @@
     }
 
     @Override
+    public @NonNull SpringAnimation getSpringForFling() {
+        return mSpring;
+    }
+
+    @Override
     public void refreshSearchResult() {
         mSearchBarController.refreshSearchResult();
     }
diff --git a/src/com/android/launcher3/anim/SpringAnimationHandler.java b/src/com/android/launcher3/anim/SpringAnimationHandler.java
index 3e58adc..eec3a48 100644
--- a/src/com/android/launcher3/anim/SpringAnimationHandler.java
+++ b/src/com/android/launcher3/anim/SpringAnimationHandler.java
@@ -70,6 +70,20 @@
     }
 
     /**
+     * Adds a spring to the list of springs handled by this class.
+     * @param spring The new spring to be added.
+     * @param setDefaultValues If True, sets the spring to the default
+     *                         {@link AnimationFactory} values.
+     */
+    public void add(SpringAnimation spring, boolean setDefaultValues) {
+        if (setDefaultValues) {
+            mAnimationFactory.setDefaultValues(spring);
+        }
+        spring.setStartVelocity(mCurrentVelocity);
+        mAnimations.add(spring);
+    }
+
+    /**
      * Adds a new or recycled animation to the list of springs handled by this class.
      *
      * @param view The view the spring is attached to.
@@ -82,15 +96,17 @@
             view.setTag(R.id.spring_animation_tag, spring);
         }
         mAnimationFactory.update(spring, object);
-        spring.setStartVelocity(mCurrentVelocity);
-        mAnimations.add(spring);
+        add(spring, false /* setDefaultValues */);
     }
 
     /**
      * Stops and removes the spring attached to {@param view}.
      */
     public void remove(View view) {
-        SpringAnimation animation = (SpringAnimation) view.getTag(R.id.spring_animation_tag);
+        remove((SpringAnimation) view.getTag(R.id.spring_animation_tag));
+    }
+
+    public void remove(SpringAnimation animation) {
         if (animation.canSkipToEnd()) {
             animation.skipToEnd();
         }
@@ -226,6 +242,11 @@
          * Updates the value of {@param spring} based on {@param object}.
          */
         void update(SpringAnimation spring, T object);
+
+        /**
+         * Sets the factory default values for the given {@param spring}.
+         */
+        void setDefaultValues(SpringAnimation spring);
     }
 
     /**
