Loading res/layout/widgets_full_sheet.xml +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/collapse_handle" android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:visibility="gone" android:clipToPadding="false" /> Loading res/layout/widgets_full_sheet_paged_view.xml +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ android:id="@+id/widgets_view_pager" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" android:layout_below="@id/collapse_handle" android:descendantFocusability="afterDescendants" Loading @@ -30,12 +29,14 @@ android:id="@+id/primary_widgets_list_view" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" /> <com.android.launcher3.widget.picker.WidgetsRecyclerView android:id="@+id/work_widgets_list_view" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" /> </com.android.launcher3.workprofile.PersonalWorkPagedView> Loading res/layout/widgets_full_sheet_recyclerview.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ android:layout_below="@id/collapse_handle" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" /> <!-- SearchAndRecommendationsView without the tab layout as well --> Loading src/com/android/launcher3/views/RecyclerViewFastScroller.java +1 −8 Original line number Diff line number Diff line Loading @@ -113,7 +113,6 @@ public class RecyclerViewFastScroller extends View { private boolean mIsThumbDetached; private final boolean mCanThumbDetach; private boolean mIgnoreDragGesture; private boolean mIsRecyclerViewFirstChildInParent = true; private long mDownTimeStampMillis; // This is the offset from the top of the scrollbar when the user first starts touching. To Loading Loading @@ -438,9 +437,7 @@ public class RecyclerViewFastScroller extends View { return false; } getHitRect(sTempRect); if (mIsRecyclerViewFirstChildInParent) { sTempRect.top += mRv.getScrollBarTop(); } if (outOffset != null) { outOffset.set(sTempRect.left, sTempRect.top); } Loading @@ -453,8 +450,4 @@ public class RecyclerViewFastScroller extends View { // alpha is so low, it does not matter. return false; } public void setIsRecyclerViewFirstChildInParent(boolean isRecyclerViewFirstChildInParent) { mIsRecyclerViewFirstChildInParent = isRecyclerViewFirstChildInParent; } } src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +13 −4 Original line number Diff line number Diff line Loading @@ -198,7 +198,6 @@ public class WidgetsFullSheet extends BaseWidgetSheet .setOnClickListener((View view) -> mViewPager.snapToPage(0)); findViewById(R.id.tab_work) .setOnClickListener((View view) -> mViewPager.snapToPage(1)); fastScroller.setIsRecyclerViewFirstChildInParent(false); mAdapters.get(AdapterHolder.WORK).setup(findViewById(R.id.work_widgets_list_view)); } else { mViewPager = null; Loading Loading @@ -334,13 +333,18 @@ public class WidgetsFullSheet extends BaseWidgetSheet setContentViewChildHorizontalMargin(mSearchScrollController.mContainer, contentHorizontalMarginInPx); if (mViewPager == null) { setContentViewChildHorizontalMargin( setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView, contentHorizontalMarginInPx); } else { setContentViewChildHorizontalMargin(mViewPager, contentHorizontalMarginInPx); setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView, contentHorizontalMarginInPx); setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.WORK).mWidgetsRecyclerView, contentHorizontalMarginInPx); } setContentViewChildHorizontalMargin( setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.SEARCH).mWidgetsRecyclerView, contentHorizontalMarginInPx); } Loading @@ -352,6 +356,11 @@ public class WidgetsFullSheet extends BaseWidgetSheet layoutParams.setMarginEnd(horizontalMarginInPx); } private static void setContentViewChildHorizontalPadding(View view, int horizontalPaddingInPx) { view.setPadding(horizontalPaddingInPx, view.getPaddingTop(), horizontalPaddingInPx, view.getPaddingBottom()); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { doMeasure(widthMeasureSpec, heightMeasureSpec); Loading Loading
res/layout/widgets_full_sheet.xml +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/collapse_handle" android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:visibility="gone" android:clipToPadding="false" /> Loading
res/layout/widgets_full_sheet_paged_view.xml +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ android:id="@+id/widgets_view_pager" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" android:layout_below="@id/collapse_handle" android:descendantFocusability="afterDescendants" Loading @@ -30,12 +29,14 @@ android:id="@+id/primary_widgets_list_view" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" /> <com.android.launcher3.widget.picker.WidgetsRecyclerView android:id="@+id/work_widgets_list_view" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" /> </com.android.launcher3.workprofile.PersonalWorkPagedView> Loading
res/layout/widgets_full_sheet_recyclerview.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ android:layout_below="@id/collapse_handle" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" android:paddingHorizontal="@dimen/widget_list_horizontal_margin" android:clipToPadding="false" /> <!-- SearchAndRecommendationsView without the tab layout as well --> Loading
src/com/android/launcher3/views/RecyclerViewFastScroller.java +1 −8 Original line number Diff line number Diff line Loading @@ -113,7 +113,6 @@ public class RecyclerViewFastScroller extends View { private boolean mIsThumbDetached; private final boolean mCanThumbDetach; private boolean mIgnoreDragGesture; private boolean mIsRecyclerViewFirstChildInParent = true; private long mDownTimeStampMillis; // This is the offset from the top of the scrollbar when the user first starts touching. To Loading Loading @@ -438,9 +437,7 @@ public class RecyclerViewFastScroller extends View { return false; } getHitRect(sTempRect); if (mIsRecyclerViewFirstChildInParent) { sTempRect.top += mRv.getScrollBarTop(); } if (outOffset != null) { outOffset.set(sTempRect.left, sTempRect.top); } Loading @@ -453,8 +450,4 @@ public class RecyclerViewFastScroller extends View { // alpha is so low, it does not matter. return false; } public void setIsRecyclerViewFirstChildInParent(boolean isRecyclerViewFirstChildInParent) { mIsRecyclerViewFirstChildInParent = isRecyclerViewFirstChildInParent; } }
src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +13 −4 Original line number Diff line number Diff line Loading @@ -198,7 +198,6 @@ public class WidgetsFullSheet extends BaseWidgetSheet .setOnClickListener((View view) -> mViewPager.snapToPage(0)); findViewById(R.id.tab_work) .setOnClickListener((View view) -> mViewPager.snapToPage(1)); fastScroller.setIsRecyclerViewFirstChildInParent(false); mAdapters.get(AdapterHolder.WORK).setup(findViewById(R.id.work_widgets_list_view)); } else { mViewPager = null; Loading Loading @@ -334,13 +333,18 @@ public class WidgetsFullSheet extends BaseWidgetSheet setContentViewChildHorizontalMargin(mSearchScrollController.mContainer, contentHorizontalMarginInPx); if (mViewPager == null) { setContentViewChildHorizontalMargin( setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView, contentHorizontalMarginInPx); } else { setContentViewChildHorizontalMargin(mViewPager, contentHorizontalMarginInPx); setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView, contentHorizontalMarginInPx); setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.WORK).mWidgetsRecyclerView, contentHorizontalMarginInPx); } setContentViewChildHorizontalMargin( setContentViewChildHorizontalPadding( mAdapters.get(AdapterHolder.SEARCH).mWidgetsRecyclerView, contentHorizontalMarginInPx); } Loading @@ -352,6 +356,11 @@ public class WidgetsFullSheet extends BaseWidgetSheet layoutParams.setMarginEnd(horizontalMarginInPx); } private static void setContentViewChildHorizontalPadding(View view, int horizontalPaddingInPx) { view.setPadding(horizontalPaddingInPx, view.getPaddingTop(), horizontalPaddingInPx, view.getPaddingBottom()); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { doMeasure(widthMeasureSpec, heightMeasureSpec); Loading