Loading src/com/android/launcher3/allapps/SearchTransitionController.java +7 −5 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import static androidx.recyclerview.widget.RecyclerView.NO_POSITION; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.clampToProgress; import android.animation.ObjectAnimator; Loading @@ -41,10 +41,10 @@ import com.android.launcher3.R; public class SearchTransitionController { // Interpolator when the user taps the QSB while already in All Apps. private static final Interpolator DEFAULT_INTERPOLATOR_WITHIN_ALL_APPS = DEACCEL_1_7; private static final Interpolator INTERPOLATOR_WITHIN_ALL_APPS = DEACCEL_1_7; // Interpolator when the user taps the QSB from home screen, so transition to all apps is // happening simultaneously. private static final Interpolator DEFAULT_INTERPOLATOR_TRANSITIONING_TO_ALL_APPS = LINEAR; private static final Interpolator INTERPOLATOR_TRANSITIONING_TO_ALL_APPS = INSTANT; /** * These values represent points on the [0, 1] animation progress spectrum. They are used to Loading Loading @@ -104,9 +104,11 @@ public class SearchTransitionController { boolean inAllApps = Launcher.getLauncher( mAllAppsContainerView.getContext()).getStateManager().isInStableState( LauncherState.ALL_APPS); if (!inAllApps) { duration = 0; // Don't want to animate when coming from QSB. } mSearchToAzAnimator.setDuration(duration).setInterpolator( inAllApps ? DEFAULT_INTERPOLATOR_WITHIN_ALL_APPS : DEFAULT_INTERPOLATOR_TRANSITIONING_TO_ALL_APPS); inAllApps ? INTERPOLATOR_WITHIN_ALL_APPS : INTERPOLATOR_TRANSITIONING_TO_ALL_APPS); mSearchToAzAnimator.addListener(forEndCallback(() -> mSearchToAzAnimator = null)); if (!goingToSearch) { mSearchToAzAnimator.addListener(forSuccessCallback(() -> { Loading Loading
src/com/android/launcher3/allapps/SearchTransitionController.java +7 −5 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import static androidx.recyclerview.widget.RecyclerView.NO_POSITION; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback; import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.clampToProgress; import android.animation.ObjectAnimator; Loading @@ -41,10 +41,10 @@ import com.android.launcher3.R; public class SearchTransitionController { // Interpolator when the user taps the QSB while already in All Apps. private static final Interpolator DEFAULT_INTERPOLATOR_WITHIN_ALL_APPS = DEACCEL_1_7; private static final Interpolator INTERPOLATOR_WITHIN_ALL_APPS = DEACCEL_1_7; // Interpolator when the user taps the QSB from home screen, so transition to all apps is // happening simultaneously. private static final Interpolator DEFAULT_INTERPOLATOR_TRANSITIONING_TO_ALL_APPS = LINEAR; private static final Interpolator INTERPOLATOR_TRANSITIONING_TO_ALL_APPS = INSTANT; /** * These values represent points on the [0, 1] animation progress spectrum. They are used to Loading Loading @@ -104,9 +104,11 @@ public class SearchTransitionController { boolean inAllApps = Launcher.getLauncher( mAllAppsContainerView.getContext()).getStateManager().isInStableState( LauncherState.ALL_APPS); if (!inAllApps) { duration = 0; // Don't want to animate when coming from QSB. } mSearchToAzAnimator.setDuration(duration).setInterpolator( inAllApps ? DEFAULT_INTERPOLATOR_WITHIN_ALL_APPS : DEFAULT_INTERPOLATOR_TRANSITIONING_TO_ALL_APPS); inAllApps ? INTERPOLATOR_WITHIN_ALL_APPS : INTERPOLATOR_TRANSITIONING_TO_ALL_APPS); mSearchToAzAnimator.addListener(forEndCallback(() -> mSearchToAzAnimator = null)); if (!goingToSearch) { mSearchToAzAnimator.addListener(forSuccessCallback(() -> { Loading