Pixel perfect drag animations in workspace and folders, including springloaded
Change-Id: I630c365bdc8e896a21dc17ebe8acb8d4664c77b5
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index 78df80f..dd0bffd 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -90,6 +90,7 @@
private int[] mTargetCell = new int[2];
private int[] mPreviousTargetCell = new int[2];
private int[] mEmptyCell = new int[2];
+ private int[] mTempXY = new int[2];
private Alarm mReorderAlarm = new Alarm();
private Alarm mOnExitAlarm = new Alarm();
private TextView mFolderName;
@@ -205,14 +206,13 @@
}
mLauncher.getWorkspace().onDragStartedWithItem(v);
- mDragController.startDrag(v, this, item, DragController.DRAG_ACTION_COPY);
+ mLauncher.getWorkspace().beginDragShared(v, this);
mIconDrawable = ((TextView) v).getCompoundDrawables()[1];
mCurrentDragInfo = item;
mEmptyCell[0] = item.cellX;
mEmptyCell[1] = item.cellY;
mCurrentDragView = v;
-
}
return true;
}
@@ -270,18 +270,6 @@
return true;
}
- public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
- if (!view.isInTouchMode()) {
- return false;
- }
-
- ShortcutInfo app = (ShortcutInfo) parent.getItemAtPosition(position);
-
- mDragController.startDrag(view, this, app, DragController.DRAG_ACTION_COPY);
- mLauncher.closeFolder(this);
- return true;
- }
-
public void setDragController(DragController dragController) {
mDragController = dragController;
}