diff options
author | Patrick Dubroy <dubroy@google.com> | 2010-11-23 14:40:33 -0800 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2010-11-24 10:00:55 -0800 |
commit | a669d79d0dcf034651ce305a8cd334272bec3374 (patch) | |
tree | 708f3671b71eaa79bdffe674ebcf65f3bb0fb4bb /src/com/android/launcher2/CustomizePagedView.java | |
parent | 2f5590d98eca736709a6dea530131a424a7b1ac7 (diff) | |
download | android_packages_apps_Trebuchet-a669d79d0dcf034651ce305a8cd334272bec3374.tar.gz android_packages_apps_Trebuchet-a669d79d0dcf034651ce305a8cd334272bec3374.tar.bz2 android_packages_apps_Trebuchet-a669d79d0dcf034651ce305a8cd334272bec3374.zip |
Prevent flicker when starting a drag.
Also, animate item the view to its new position when dragging.
Diffstat (limited to 'src/com/android/launcher2/CustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher2/CustomizePagedView.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java index 6db6aa9a9..b48d4ab49 100644 --- a/src/com/android/launcher2/CustomizePagedView.java +++ b/src/com/android/launcher2/CustomizePagedView.java @@ -312,6 +312,10 @@ public class CustomizePagedView extends PagedView } @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 @@ 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: |