Loading res/layout-land/all_apps_fast_scroller.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ android:id="@+id/fast_scroller_popup" style="@style/FastScrollerPopup" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginTop="-5dp" android:layout_marginEnd="-45dp" /> Loading @@ -31,7 +31,7 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignParentTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="-88dp" android:layout_marginTop="14dp" launcher:canThumbDetach="true" /> Loading res/layout-sw720dp/all_apps_fast_scroller.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ android:id="@+id/fast_scroller_popup" style="@style/FastScrollerPopup" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_popup_margin" /> <com.android.launcher3.views.RecyclerViewFastScroller Loading @@ -30,7 +30,7 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_end_margin" launcher:canThumbDetach="true" /> Loading res/layout/all_apps_fast_scroller.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ android:id="@+id/fast_scroller_popup" style="@style/FastScrollerPopup" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_popup_margin" /> <com.android.launcher3.views.RecyclerViewFastScroller Loading @@ -30,7 +30,7 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_end_margin" launcher:canThumbDetach="true" /> Loading src/com/android/launcher3/BaseRecyclerView.java +2 −7 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ public abstract class BaseRecyclerView extends RecyclerView ViewGroup parent = (ViewGroup) getParent().getParent(); mScrollbar = parent.findViewById(R.id.fast_scroller); mScrollbar.setRecyclerView(this, parent.findViewById(R.id.fast_scroller_popup)); onUpdateScrollbar(0); } /** Loading Loading @@ -112,7 +113,7 @@ public abstract class BaseRecyclerView extends RecyclerView * Returns the height of the fast scroll bar */ public int getScrollbarTrackHeight() { return getHeight() - getScrollBarTop() - getPaddingBottom(); return mScrollbar.getHeight() - getScrollBarTop() - getPaddingBottom(); } /** Loading @@ -130,12 +131,6 @@ public abstract class BaseRecyclerView extends RecyclerView return availableScrollBarHeight; } @Override protected void dispatchDraw(Canvas canvas) { onUpdateScrollbar(0); super.dispatchDraw(canvas); } /** * Updates the scrollbar thumb offset to match the visible scroll of the recycler view. It does * this by mapping the available scroll area of the recycler view to the available space for the Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +3 −12 Original line number Diff line number Diff line Loading @@ -493,19 +493,9 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource, mViewPager.setAdapter(mTabsPagerAdapter = new TabsPagerAdapter()); mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { boolean mVisible = true; @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { tabs.updateIndicatorPosition(position, positionOffset); if (positionOffset == 0 && !mVisible || positionOffset > 0 && mVisible) { mVisible = positionOffset == 0; for (int i = 0; i < mAH.length; i++) { if (mAH[i].recyclerView != null) { mAH[i].recyclerView.getScrollbar().setAlpha(mVisible ? 1 : 0); } } } } @Override Loading @@ -525,6 +515,7 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource, public void onPageScrollStateChanged(int state) { } }); mAH[AdapterHolder.MAIN].recyclerView.bindFastScrollbar(); findViewById(R.id.tab_personal) .setOnClickListener((View view) -> mViewPager.setCurrentItem(0)); Loading Loading @@ -572,8 +563,8 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource, contentHeight += getResources() .getDimensionPixelSize(R.dimen.all_apps_prediction_row_divider_height); } RecyclerView mainRV = mAH[AdapterHolder.MAIN].recyclerView; RecyclerView workRV = mAH[AdapterHolder.WORK].recyclerView; AllAppsRecyclerView mainRV = mAH[AdapterHolder.MAIN].recyclerView; AllAppsRecyclerView workRV = mAH[AdapterHolder.WORK].recyclerView; mFloatingHeaderHandler.setup(mainRV, workRV, contentHeight); mFloatingHeaderHandler.getContentView().setup(mAH[AdapterHolder.MAIN].adapter, mComponentToAppMap, mNumPredictedAppsPerRow); Loading Loading
res/layout-land/all_apps_fast_scroller.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ android:id="@+id/fast_scroller_popup" style="@style/FastScrollerPopup" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginTop="-5dp" android:layout_marginEnd="-45dp" /> Loading @@ -31,7 +31,7 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignParentTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="-88dp" android:layout_marginTop="14dp" launcher:canThumbDetach="true" /> Loading
res/layout-sw720dp/all_apps_fast_scroller.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ android:id="@+id/fast_scroller_popup" style="@style/FastScrollerPopup" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_popup_margin" /> <com.android.launcher3.views.RecyclerViewFastScroller Loading @@ -30,7 +30,7 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_end_margin" launcher:canThumbDetach="true" /> Loading
res/layout/all_apps_fast_scroller.xml +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ android:id="@+id/fast_scroller_popup" style="@style/FastScrollerPopup" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_popup_margin" /> <com.android.launcher3.views.RecyclerViewFastScroller Loading @@ -30,7 +30,7 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignTop="@+id/apps_list_view" android:layout_below="@+id/search_container_all_apps" android:layout_marginEnd="@dimen/fastscroll_end_margin" launcher:canThumbDetach="true" /> Loading
src/com/android/launcher3/BaseRecyclerView.java +2 −7 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ public abstract class BaseRecyclerView extends RecyclerView ViewGroup parent = (ViewGroup) getParent().getParent(); mScrollbar = parent.findViewById(R.id.fast_scroller); mScrollbar.setRecyclerView(this, parent.findViewById(R.id.fast_scroller_popup)); onUpdateScrollbar(0); } /** Loading Loading @@ -112,7 +113,7 @@ public abstract class BaseRecyclerView extends RecyclerView * Returns the height of the fast scroll bar */ public int getScrollbarTrackHeight() { return getHeight() - getScrollBarTop() - getPaddingBottom(); return mScrollbar.getHeight() - getScrollBarTop() - getPaddingBottom(); } /** Loading @@ -130,12 +131,6 @@ public abstract class BaseRecyclerView extends RecyclerView return availableScrollBarHeight; } @Override protected void dispatchDraw(Canvas canvas) { onUpdateScrollbar(0); super.dispatchDraw(canvas); } /** * Updates the scrollbar thumb offset to match the visible scroll of the recycler view. It does * this by mapping the available scroll area of the recycler view to the available space for the Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +3 −12 Original line number Diff line number Diff line Loading @@ -493,19 +493,9 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource, mViewPager.setAdapter(mTabsPagerAdapter = new TabsPagerAdapter()); mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { boolean mVisible = true; @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { tabs.updateIndicatorPosition(position, positionOffset); if (positionOffset == 0 && !mVisible || positionOffset > 0 && mVisible) { mVisible = positionOffset == 0; for (int i = 0; i < mAH.length; i++) { if (mAH[i].recyclerView != null) { mAH[i].recyclerView.getScrollbar().setAlpha(mVisible ? 1 : 0); } } } } @Override Loading @@ -525,6 +515,7 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource, public void onPageScrollStateChanged(int state) { } }); mAH[AdapterHolder.MAIN].recyclerView.bindFastScrollbar(); findViewById(R.id.tab_personal) .setOnClickListener((View view) -> mViewPager.setCurrentItem(0)); Loading Loading @@ -572,8 +563,8 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource, contentHeight += getResources() .getDimensionPixelSize(R.dimen.all_apps_prediction_row_divider_height); } RecyclerView mainRV = mAH[AdapterHolder.MAIN].recyclerView; RecyclerView workRV = mAH[AdapterHolder.WORK].recyclerView; AllAppsRecyclerView mainRV = mAH[AdapterHolder.MAIN].recyclerView; AllAppsRecyclerView workRV = mAH[AdapterHolder.WORK].recyclerView; mFloatingHeaderHandler.setup(mainRV, workRV, contentHeight); mFloatingHeaderHandler.getContentView().setup(mAH[AdapterHolder.MAIN].adapter, mComponentToAppMap, mNumPredictedAppsPerRow); Loading