Merge "Use the right content to estimate the span in WidgetsFullSheet" into sc-v2-dev am: a54535b8f5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15430778

Change-Id: Ief8c00356ca2e930da4b2e6195e1e74b66ad8aee
This commit is contained in:
Steven Ng
2021-07-30 14:33:21 +00:00
committed by Automerger Merge Worker
@@ -402,7 +402,10 @@ public class WidgetsFullSheet extends BaseWidgetSheet
private boolean updateMaxSpansPerRow() {
if (getMeasuredWidth() == 0) return false;
int maxHorizontalSpans = computeMaxHorizontalSpans(mContent,
View content = mHasWorkProfile
? mViewPager
: mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView;
int maxHorizontalSpans = computeMaxHorizontalSpans(content,
mWidgetSheetContentHorizontalPadding);
if (mMaxSpansPerRow != maxHorizontalSpans) {
mMaxSpansPerRow = maxHorizontalSpans;