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/DragController.java | |
parent | 2f5590d98eca736709a6dea530131a424a7b1ac7 (diff) | |
download | packages_apps_trebuchet-a669d79d0dcf034651ce305a8cd334272bec3374.zip packages_apps_trebuchet-a669d79d0dcf034651ce305a8cd334272bec3374.tar.gz packages_apps_trebuchet-a669d79d0dcf034651ce305a8cd334272bec3374.tar.bz2 |
Prevent flicker when starting a drag.
Also, animate item the view to its new position when dragging.
Diffstat (limited to 'src/com/android/launcher2/DragController.java')
-rw-r--r-- | src/com/android/launcher2/DragController.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java index 2b566b7..a0a44a5 100644 --- a/src/com/android/launcher2/DragController.java +++ b/src/com/android/launcher2/DragController.java @@ -320,6 +320,13 @@ public class DragController { DragView dragView = mDragView = new DragView(mContext, b, registrationX, registrationY, textureLeft, textureTop, textureWidth, textureHeight); + final DragSource dragSource = source; + dragView.setOnDrawRunnable(new Runnable() { + public void run() { + dragSource.onDragViewVisible(); + }; + }); + if (dragRegion != null) { dragView.setDragRegion(dragRegionLeft, dragRegion.top, dragRegion.right - dragRegionLeft, dragRegion.bottom - dragRegionTop); |