diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 0a0452daf9..682c2ed2e5 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -947,9 +947,11 @@ public class CellLayout extends ViewGroup { int heightSpecMode = MeasureSpec.getMode(heightMeasureSpec); int widthSize = MeasureSpec.getSize(widthMeasureSpec); int heightSize = MeasureSpec.getSize(heightMeasureSpec); - if (mCellWidth < 0 || mCellHeight < 0) { - mCellWidth = grid.calculateCellWidth(widthSize, mCountX); - mCellHeight = grid.calculateCellHeight(heightSize, mCountY); + int cw = grid.calculateCellWidth(widthSize, mCountX); + int ch = grid.calculateCellHeight(heightSize, mCountY); + if (cw != mCellWidth || ch != mCellHeight) { + mCellWidth = cw; + mCellHeight = ch; mShortcutsAndWidgets.setCellDimensions(mCellWidth, mCellHeight, mWidthGap, mHeightGap, mCountX, mCountY); }