Loading res/values/dimens.xml +2 −5 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ --> <dimen name="fastscroll_width">58dp</dimen> <dimen name="fastscroll_end_margin">-26dp</dimen> <!-- Extra margin between bottom of the scrollbar and the search bar protection layer. --> <dimen name="fastscroll_bottom_margin_floating_search">4dp</dimen> <!-- PagedView --> <dimen name="fling_threshold_velocity">500dp</dimen> Loading Loading @@ -139,11 +141,6 @@ <dimen name="arrow_toast_elevation">2dp</dimen> <dimen name="arrow_toast_arrow_width">10dp</dimen> <!-- Search bar in All Apps --> <dimen name="all_apps_header_max_elevation">3dp</dimen> <dimen name="all_apps_header_scroll_to_elevation">16dp</dimen> <dimen name="all_apps_header_shadow_height">6dp</dimen> <dimen name="all_apps_divider_margin_vertical">8dp</dimen> <!-- Floating action button inside work tab to toggle work profile --> Loading src/com/android/launcher3/FastScrollRecyclerView.java +5 −1 Original line number Diff line number Diff line Loading @@ -77,11 +77,15 @@ public abstract class FastScrollRecyclerView extends RecyclerView { return getPaddingTop(); } public int getScrollBarMarginBottom() { return getPaddingBottom(); } /** * Returns the height of the fast scroll bar */ public int getScrollbarTrackHeight() { return mScrollbar.getHeight() - getScrollBarTop() - getPaddingBottom(); return mScrollbar.getHeight() - getScrollBarTop() - getScrollBarMarginBottom(); } /** Loading src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +12 −2 Original line number Diff line number Diff line Loading @@ -215,9 +215,9 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> mBottomSheetHandleArea = findViewById(R.id.bottom_sheet_handle_area); mSearchRecyclerView = findViewById(R.id.search_results_list_view); // Add the search box next to the header // Add the search box above everything else. mSearchContainer = inflateSearchBox(); addView(mSearchContainer, indexOfChild(mHeader) + 1); addView(mSearchContainer); mSearchUiManager = (SearchUiManager) mSearchContainer; } Loading Loading @@ -469,6 +469,16 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> } setupHeader(); if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) { // Keep the scroller above the search bar. RelativeLayout.LayoutParams scrollerLayoutParams = (LayoutParams) findViewById(R.id.fast_scroller).getLayoutParams(); scrollerLayoutParams.addRule(RelativeLayout.ABOVE, R.id.search_container_all_apps); scrollerLayoutParams.removeRule(RelativeLayout.ALIGN_PARENT_BOTTOM); scrollerLayoutParams.bottomMargin = getResources().getDimensionPixelSize( R.dimen.fastscroll_bottom_margin_floating_search); } mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.MAIN).mRecyclerView); mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.WORK).mRecyclerView); mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.SEARCH).mRecyclerView); Loading src/com/android/launcher3/allapps/AllAppsRecyclerView.java +7 −0 Original line number Diff line number Diff line Loading @@ -261,12 +261,19 @@ public class AllAppsRecyclerView extends FastScrollRecyclerView { } } @Override public int getScrollBarTop() { return ActivityContext.lookupContext(getContext()).getAppsView().isSearchSupported() ? getResources().getDimensionPixelOffset(R.dimen.all_apps_header_top_padding) : 0; } @Override public int getScrollBarMarginBottom() { return getRootWindowInsets() == null ? 0 : getRootWindowInsets().getSystemWindowInsetBottom(); } public RecyclerViewFastScroller getScrollbar() { return mScrollbar; } Loading Loading
res/values/dimens.xml +2 −5 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ --> <dimen name="fastscroll_width">58dp</dimen> <dimen name="fastscroll_end_margin">-26dp</dimen> <!-- Extra margin between bottom of the scrollbar and the search bar protection layer. --> <dimen name="fastscroll_bottom_margin_floating_search">4dp</dimen> <!-- PagedView --> <dimen name="fling_threshold_velocity">500dp</dimen> Loading Loading @@ -139,11 +141,6 @@ <dimen name="arrow_toast_elevation">2dp</dimen> <dimen name="arrow_toast_arrow_width">10dp</dimen> <!-- Search bar in All Apps --> <dimen name="all_apps_header_max_elevation">3dp</dimen> <dimen name="all_apps_header_scroll_to_elevation">16dp</dimen> <dimen name="all_apps_header_shadow_height">6dp</dimen> <dimen name="all_apps_divider_margin_vertical">8dp</dimen> <!-- Floating action button inside work tab to toggle work profile --> Loading
src/com/android/launcher3/FastScrollRecyclerView.java +5 −1 Original line number Diff line number Diff line Loading @@ -77,11 +77,15 @@ public abstract class FastScrollRecyclerView extends RecyclerView { return getPaddingTop(); } public int getScrollBarMarginBottom() { return getPaddingBottom(); } /** * Returns the height of the fast scroll bar */ public int getScrollbarTrackHeight() { return mScrollbar.getHeight() - getScrollBarTop() - getPaddingBottom(); return mScrollbar.getHeight() - getScrollBarTop() - getScrollBarMarginBottom(); } /** Loading
src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +12 −2 Original line number Diff line number Diff line Loading @@ -215,9 +215,9 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> mBottomSheetHandleArea = findViewById(R.id.bottom_sheet_handle_area); mSearchRecyclerView = findViewById(R.id.search_results_list_view); // Add the search box next to the header // Add the search box above everything else. mSearchContainer = inflateSearchBox(); addView(mSearchContainer, indexOfChild(mHeader) + 1); addView(mSearchContainer); mSearchUiManager = (SearchUiManager) mSearchContainer; } Loading Loading @@ -469,6 +469,16 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext> } setupHeader(); if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) { // Keep the scroller above the search bar. RelativeLayout.LayoutParams scrollerLayoutParams = (LayoutParams) findViewById(R.id.fast_scroller).getLayoutParams(); scrollerLayoutParams.addRule(RelativeLayout.ABOVE, R.id.search_container_all_apps); scrollerLayoutParams.removeRule(RelativeLayout.ALIGN_PARENT_BOTTOM); scrollerLayoutParams.bottomMargin = getResources().getDimensionPixelSize( R.dimen.fastscroll_bottom_margin_floating_search); } mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.MAIN).mRecyclerView); mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.WORK).mRecyclerView); mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.SEARCH).mRecyclerView); Loading
src/com/android/launcher3/allapps/AllAppsRecyclerView.java +7 −0 Original line number Diff line number Diff line Loading @@ -261,12 +261,19 @@ public class AllAppsRecyclerView extends FastScrollRecyclerView { } } @Override public int getScrollBarTop() { return ActivityContext.lookupContext(getContext()).getAppsView().isSearchSupported() ? getResources().getDimensionPixelOffset(R.dimen.all_apps_header_top_padding) : 0; } @Override public int getScrollBarMarginBottom() { return getRootWindowInsets() == null ? 0 : getRootWindowInsets().getSystemWindowInsetBottom(); } public RecyclerViewFastScroller getScrollbar() { return mScrollbar; } Loading