From 3c71c6a564004c70041e531ddea77f4f90f9edac Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Fri, 15 Jun 2018 11:12:21 -0700 Subject: [PATCH] Fix bug where QSB gets clipped when flinging All Apps open. Bug: 77538324 Change-Id: I3e40346559fd3b7010d92d28e12efcf2d8581640 --- src/com/android/launcher3/allapps/AllAppsContainerView.java | 3 ++- src/com/android/launcher3/views/SpringRelativeLayout.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 4d63c960a4..fdf32af6d2 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -314,7 +314,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo @Override public int getCanvasClipTopForOverscroll() { - return mHeader.getTop(); + // Do not clip if the QSB is attached to the spring, otherwise the QSB will get clipped. + return mSpringViews.get(getSearchView().getId()) ? 0 : mHeader.getTop(); } private void rebindAdapters(boolean showTabs) { diff --git a/src/com/android/launcher3/views/SpringRelativeLayout.java b/src/com/android/launcher3/views/SpringRelativeLayout.java index 892c59f272..b0313ceab8 100644 --- a/src/com/android/launcher3/views/SpringRelativeLayout.java +++ b/src/com/android/launcher3/views/SpringRelativeLayout.java @@ -54,7 +54,7 @@ public class SpringRelativeLayout extends RelativeLayout { } }; - private final SparseBooleanArray mSpringViews = new SparseBooleanArray(); + protected final SparseBooleanArray mSpringViews = new SparseBooleanArray(); private final SpringAnimation mSpring; private float mDampedScrollShift = 0;