From 6e91ccbe82889fcb2e56b15da6dcceb2ab22dc94 Mon Sep 17 00:00:00 2001 From: "sfufa@google.com" Date: Sun, 19 Sep 2021 22:31:23 -0700 Subject: [PATCH] [Search] Sync header Y translation with AllApps y scroll Instead of calling scrollToTop directly, calling mHeader.reset scrolls recylcerview to top and reset headerView y translation Bug: 195365449 Test: enable three button mode, open AllApps, slightly scroll so predictions are partially visible, tap on search box and then outside; verify AllApps is scrolled to top and header is reset appropriately. Change-Id: I9ba7cf019cb23dd259356243dc2a6294ca5481fe --- src/com/android/launcher3/allapps/AllAppsContainerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index e779ee80ea..cad2a45074 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -640,7 +640,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo public void onClearSearchResult() { mIsSearching = false; rebindAdapters(); - getActiveRecyclerView().scrollToTop(); + mHeader.reset(false); } public void onSearchResultsChanged() {