Prevent flicker when starting a drag.

Also, animate item the view to its new position when dragging.
This commit is contained in:
Patrick Dubroy
2010-11-23 14:40:33 -08:00
parent 2f5590d98e
commit a669d79d0d
11 changed files with 116 additions and 42 deletions

View File

@@ -311,6 +311,10 @@ public class CustomizePagedView extends PagedView
mLauncher.getWorkspace().onDragStopped();
}
@Override
public void onDragViewVisible() {
}
@Override
public void onClick(View v) {
// Return early if this is not initiated from a touch
@@ -490,16 +494,14 @@ public class CustomizePagedView extends PagedView
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: