mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Use the icon bounds for all calculations.
- Fixes a drag and drop issue when the dynamic grid scales icons down, due to the drawable bounds not being equal to their bitmap sizes. Change-Id: If7c68b51131de7bac3195a2619e22340f7789432
This commit is contained in:
@@ -198,7 +198,7 @@ public class DragController {
|
||||
* @param dragRegion Coordinates within the bitmap b for the position of item being dragged.
|
||||
* Makes dragging feel more precise, e.g. you can clip out a transparent border
|
||||
*/
|
||||
public void startDrag(Bitmap b, int dragLayerX, int dragLayerY,
|
||||
public DragView startDrag(Bitmap b, int dragLayerX, int dragLayerY,
|
||||
DragSource source, Object dragInfo, int dragAction, Point dragOffset, Rect dragRegion,
|
||||
float initialDragViewScale) {
|
||||
if (PROFILE_DRAWING_DURING_DRAG) {
|
||||
@@ -245,6 +245,7 @@ public class DragController {
|
||||
mLauncher.getDragLayer().performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
||||
dragView.show(mMotionDownX, mMotionDownY);
|
||||
handleMoveEvent(mMotionDownX, mMotionDownY);
|
||||
return dragView;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user