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

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

Change-Id: If3f1a53cd20bc8f6213db58800b4a72fecbb33c0
This commit is contained in:
Adam Cohen
2021-07-22 23:09:49 +00:00
committed by Automerger Merge Worker
+3 -2
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;