[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
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index e779ee8..cad2a45 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -640,7 +640,7 @@
public void onClearSearchResult() {
mIsSearching = false;
rebindAdapters();
- getActiveRecyclerView().scrollToTop();
+ mHeader.reset(false);
}
public void onSearchResultsChanged() {