Use the right content to estimate the span in WidgetsFullSheet
Test: Manual Fix: 194784402 Change-Id: I150f4c7b5a0344caa2bea3f1502894cb0f32e208
This commit is contained in:
parent
02d45252f3
commit
3edfa98ba7
|
@ -402,7 +402,10 @@ public class WidgetsFullSheet extends BaseWidgetSheet
|
||||||
private boolean updateMaxSpansPerRow() {
|
private boolean updateMaxSpansPerRow() {
|
||||||
if (getMeasuredWidth() == 0) return false;
|
if (getMeasuredWidth() == 0) return false;
|
||||||
|
|
||||||
int maxHorizontalSpans = computeMaxHorizontalSpans(mContent,
|
View content = mHasWorkProfile
|
||||||
|
? mViewPager
|
||||||
|
: mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView;
|
||||||
|
int maxHorizontalSpans = computeMaxHorizontalSpans(content,
|
||||||
mWidgetSheetContentHorizontalPadding);
|
mWidgetSheetContentHorizontalPadding);
|
||||||
if (mMaxSpansPerRow != maxHorizontalSpans) {
|
if (mMaxSpansPerRow != maxHorizontalSpans) {
|
||||||
mMaxSpansPerRow = maxHorizontalSpans;
|
mMaxSpansPerRow = maxHorizontalSpans;
|
||||||
|
|
Loading…
Reference in New Issue