Prevent flicker when starting a drag.
Also, animate item the view to its new position when dragging.
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 6db6aa9..b48d4ab 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -312,6 +312,10 @@
}
@Override
+ public void onDragViewVisible() {
+ }
+
+ @Override
public void onClick(View v) {
// Return early if this is not initiated from a touch
if (!v.isInTouchMode()) return;
@@ -490,16 +494,14 @@
mLauncher.getWorkspace().onDragStartedWithItemMinSize(
createWidgetInfo.minWidth, createWidgetInfo.minHeight);
- mDragController.startDrag(v, b, this, createWidgetInfo, DragController.DRAG_ACTION_COPY,
- null);
+ mDragController.startDrag(v, b, this, createWidgetInfo, DragController.DRAG_ACTION_COPY, null);
// Cleanup the icon
b.recycle();
return true;
case ShortcutCustomization:
createItemInfo = (PendingAddItemInfo) v.getTag();
- mDragController.startDrag(
- v, this, createItemInfo, DragController.DRAG_ACTION_COPY, null);
+ mDragController.startDrag(v, this, createItemInfo, DragController.DRAG_ACTION_COPY);
mLauncher.getWorkspace().onDragStartedWithItemSpans(1, 1);
return true;
case ApplicationCustomization: