Fix widget drop preview outline on 4x5 grids am: ed82e0daef

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

Change-Id: I7357e10bd2b90ac7326b858c87c4b03a60dce25f
This commit is contained in:
Adam Cohen
2021-07-22 22:54:33 +00:00
committed by Automerger Merge Worker

View File

@@ -566,9 +566,10 @@ public class CellLayout extends ViewGroup {
int spanX = mDragOutlines[i].cellHSpan;
int spanY = mDragOutlines[i].cellVSpan;
// TODO b/194414754 clean this up, reconcile with cellToRect
mVisualizeGridRect.set(paddingX, paddingY,
mCellWidth * spanX - paddingX,
mCellHeight * spanY - paddingY);
mCellWidth * spanX + mBorderSpacing * (spanX - 1) - paddingX,
mCellHeight * spanY + mBorderSpacing * (spanY - 1) - paddingY);
int transX = x * mCellWidth + (x * mBorderSpacing)
+ getPaddingLeft() + paddingX;