Add an option to hide/show scrollbar in app drawer (#4090)

* Added option to hide/show scrollbar in app drawer (all apps)

* Update src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java

* Fix

* Requested changes from review
Removed description and moved prefs check

---------

Co-authored-by: Zongle Wang <wangzongler@gmail.com>
This commit is contained in:
SlowNicoFish
2024-02-23 08:52:21 +01:00
committed by GitHub
parent 9d70a50f67
commit 0ae0ce9ae1
5 changed files with 15 additions and 1 deletions

View File

@@ -261,6 +261,8 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
* onFinishInflate -> onPostCreate
*/
protected void initContent() {
boolean showFastScroller = PreferenceExtensionsKt.firstBlocking(pref2.getShowScrollbar());
mMainAdapterProvider = mSearchUiDelegate.createMainAdapterProvider();
mAH.set(AdapterHolder.MAIN, new AdapterHolder(AdapterHolder.MAIN,
@@ -277,7 +279,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
mSearchRecyclerView = findViewById(R.id.search_results_list_view);
mFastScroller = findViewById(R.id.fast_scroller);
mFastScroller.setPopupView(findViewById(R.id.fast_scroller_popup));
mFastScroller.setVisibility(showFastScroller ? VISIBLE : INVISIBLE);
mSearchContainer = inflateSearchBar();
if (!isSearchBarFloating()) {
// Add the search box above everything else in this container (if the flag is