diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index ce9885a5190..81df520a257 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -178,6 +178,7 @@ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { * state. */ private boolean mIsSearching; + boolean showFastScroller; private boolean mRebindAdaptersAfterSearchAnimation; private int mNavBarScrimHeight = 0; public SearchRecyclerView mSearchRecyclerView; @@ -259,7 +260,7 @@ public AllAppsSearchUiDelegate getSearchUiDelegate() { * onFinishInflate -> onPostCreate */ protected void initContent() { - boolean showFastScroller = PreferenceExtensionsKt.firstBlocking(pref2.getShowScrollbar()); + showFastScroller = PreferenceExtensionsKt.firstBlocking(pref2.getShowScrollbar()); mMainAdapterProvider = mSearchUiDelegate.createMainAdapterProvider(); @@ -409,6 +410,7 @@ private void animateToSearchState(boolean goingToSearch, long durationMs) { } else if (mAllAppsTransitionController != null) { // If exiting search, revert predictive back scale on all apps mAllAppsTransitionController.animateAllAppsToNoScale(); + mFastScroller.setVisibility(showFastScroller ? VISIBLE : INVISIBLE); } mSearchTransitionController.animateToSearchState(goingToSearch, durationMs, /* onEndRunnable = */ () -> {