From 6f4e499f22a1a65a83daf578e48dcd3ff6896178 Mon Sep 17 00:00:00 2001 From: Mario Bertschler Date: Tue, 28 Nov 2017 11:59:08 -0800 Subject: [PATCH] Fixes the new search anim + worktabs/prediction row if the floating header is in collapsed state. Bug: 68713881 Change-Id: I76ca010e36987fbe7659ee1787c7482af151aef2 --- .../android/launcher3/allapps/FloatingHeaderHandler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/FloatingHeaderHandler.java b/src/com/android/launcher3/allapps/FloatingHeaderHandler.java index 0b39b7db64..c4b533b74d 100644 --- a/src/com/android/launcher3/allapps/FloatingHeaderHandler.java +++ b/src/com/android/launcher3/allapps/FloatingHeaderHandler.java @@ -160,7 +160,13 @@ public class FloatingHeaderHandler extends RecyclerView.OnScrollListener private void apply() { int uncappedTranslationY = mTranslationY; mTranslationY = Math.max(mTranslationY, -mMaxTranslation); - mPredictionRow.setTranslationY(uncappedTranslationY); + if (mTranslationY != uncappedTranslationY) { + // we hide it completely if already capped (for opening search anim) + mPredictionRow.setVisibility(View.INVISIBLE); + } else { + mPredictionRow.setVisibility(View.VISIBLE); + mPredictionRow.setTranslationY(uncappedTranslationY); + } mTabLayout.setTranslationY(mTranslationY); mDivider.setTranslationY(mTopOnlyMode ? uncappedTranslationY : mTranslationY); mClip.top = mMaxTranslation + mTranslationY;