From a2dc7c351d1455f578bf424b13dbf033344799ea Mon Sep 17 00:00:00 2001 From: Winson Date: Thu, 1 Oct 2015 12:19:23 -0700 Subject: [PATCH] Fixing regression in search bar animation. - The other case should fall through to the animation even when there is no search bar overlay. Change-Id: Id91bea78b56934cc1c3379777068adc100f11dba --- .../launcher3/LauncherStateTransitionAnimation.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java index 5b8af97585..47b0a91668 100644 --- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java +++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java @@ -274,7 +274,7 @@ public class LauncherStateTransitionAnimation { if (overlaySearchBarView != null) { overlaySearchBarView.setAlpha(0f); ObjectAnimator searchBarAlpha = ObjectAnimator.ofFloat(overlaySearchBarView, "alpha", 0f, 1f); - searchBarAlpha.setDuration(100); + searchBarAlpha.setDuration(revealDuration / 2); searchBarAlpha.setInterpolator(new AccelerateInterpolator(1.5f)); layerViews.put(overlaySearchBarView, BUILD_AND_SET_LAYER); animation.play(searchBarAlpha); @@ -593,8 +593,8 @@ public class LauncherStateTransitionAnimation { if (overlaySearchBarView != null) { overlaySearchBarView.setAlpha(1f); ObjectAnimator searchAlpha = ObjectAnimator.ofFloat(overlaySearchBarView, "alpha", 1f, 0f); - searchAlpha.setDuration(material ? 100 : 150); - searchAlpha.setInterpolator(decelerateInterpolator); + searchAlpha.setDuration(revealDuration / 2); + searchAlpha.setInterpolator(new AccelerateInterpolator(1.5f)); searchAlpha.setStartDelay(material ? 0 : itemsAlphaStagger + SINGLE_FRAME_DELAY); layerViews.put(overlaySearchBarView, BUILD_AND_SET_LAYER); animation.play(searchAlpha); @@ -730,9 +730,9 @@ public class LauncherStateTransitionAnimation { return; } } - // Fallback to the default search bar animation otherwise - mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, duration); } + // Fallback to the default search bar animation otherwise + mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, duration); } /**