diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 0a0452daf..682c2ed2e 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); } |