Loading src/com/android/launcher3/CellLayout.java +5 −2 Original line number Diff line number Diff line Loading @@ -1080,9 +1080,10 @@ public class CellLayout extends ViewGroup { cellToRect(targetCell[0], targetCell[1], spanX, spanY, mTempRect); // Now get the rect in drag layer coordinates. getBoundsForViewInDragLayer(launcher.getDragLayer(), workspace, mTempRect, false, getBoundsForViewInDragLayer(launcher.getDragLayer(), this, mTempRect, true, mTmpFloatArray, mTempRectF); Utilities.setRect(mTempRectF, mTempRect); ((LauncherAppWidgetHostView) view).handleDrag(mTempRect, pageId); } } Loading Loading @@ -2594,7 +2595,9 @@ public class CellLayout extends ViewGroup { final int cellWidth = mCellWidth; final int cellHeight = mCellHeight; final int hStartPadding = getPaddingLeft(); // We observe a shift of 1 pixel on the x coordinate compared to the actual cell coordinates final int hStartPadding = getPaddingLeft() + (int) Math.ceil(getUnusedHorizontalSpace() / 2f); final int vStartPadding = getPaddingTop(); int x = hStartPadding + (cellX * mBorderSpacing) + (cellX * cellWidth); Loading src/com/android/launcher3/widget/LauncherAppWidgetHostView.java +7 −3 Original line number Diff line number Diff line Loading @@ -319,11 +319,15 @@ public class LauncherAppWidgetHostView extends NavigableAppWidgetHostView } mIsScrollable = checkScrollableRecursively(this); if (!mIsInDragMode && getTag() instanceof LauncherAppWidgetInfo) { mCurrentWidgetSize.left = left; mCurrentWidgetSize.right = right; mCurrentWidgetSize.top = top; mCurrentWidgetSize.bottom = bottom; LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) getTag(); getBoundsForViewInDragLayer(mLauncher.getDragLayer(), this, mCurrentWidgetSize, true, mTmpFloatArray, mTempRectF); getBoundsForViewInDragLayer(mLauncher.getDragLayer(), (View) getParent(), mCurrentWidgetSize, true, mTmpFloatArray, mTempRectF); setRect(mTempRectF, mCurrentWidgetSize); updateColorExtraction(mCurrentWidgetSize, mWorkspace.getPageIndexForScreenId(info.screenId)); Loading Loading
src/com/android/launcher3/CellLayout.java +5 −2 Original line number Diff line number Diff line Loading @@ -1080,9 +1080,10 @@ public class CellLayout extends ViewGroup { cellToRect(targetCell[0], targetCell[1], spanX, spanY, mTempRect); // Now get the rect in drag layer coordinates. getBoundsForViewInDragLayer(launcher.getDragLayer(), workspace, mTempRect, false, getBoundsForViewInDragLayer(launcher.getDragLayer(), this, mTempRect, true, mTmpFloatArray, mTempRectF); Utilities.setRect(mTempRectF, mTempRect); ((LauncherAppWidgetHostView) view).handleDrag(mTempRect, pageId); } } Loading Loading @@ -2594,7 +2595,9 @@ public class CellLayout extends ViewGroup { final int cellWidth = mCellWidth; final int cellHeight = mCellHeight; final int hStartPadding = getPaddingLeft(); // We observe a shift of 1 pixel on the x coordinate compared to the actual cell coordinates final int hStartPadding = getPaddingLeft() + (int) Math.ceil(getUnusedHorizontalSpace() / 2f); final int vStartPadding = getPaddingTop(); int x = hStartPadding + (cellX * mBorderSpacing) + (cellX * cellWidth); Loading
src/com/android/launcher3/widget/LauncherAppWidgetHostView.java +7 −3 Original line number Diff line number Diff line Loading @@ -319,11 +319,15 @@ public class LauncherAppWidgetHostView extends NavigableAppWidgetHostView } mIsScrollable = checkScrollableRecursively(this); if (!mIsInDragMode && getTag() instanceof LauncherAppWidgetInfo) { mCurrentWidgetSize.left = left; mCurrentWidgetSize.right = right; mCurrentWidgetSize.top = top; mCurrentWidgetSize.bottom = bottom; LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) getTag(); getBoundsForViewInDragLayer(mLauncher.getDragLayer(), this, mCurrentWidgetSize, true, mTmpFloatArray, mTempRectF); getBoundsForViewInDragLayer(mLauncher.getDragLayer(), (View) getParent(), mCurrentWidgetSize, true, mTmpFloatArray, mTempRectF); setRect(mTempRectF, mCurrentWidgetSize); updateColorExtraction(mCurrentWidgetSize, mWorkspace.getPageIndexForScreenId(info.screenId)); Loading