diff options
author | Patrick Dubroy <dubroy@google.com> | 2010-07-13 17:50:32 -0700 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2010-07-13 17:54:03 -0700 |
commit | 440c360bc395c43683fa9ca226e59f9e35f9e926 (patch) | |
tree | 54a690d1c973348e2f05be1b051329ecdec7a91a /src/com/android/launcher2/DropTarget.java | |
parent | 6569f2c80e179c2f8ed73dae6b01d971ec20f005 (diff) | |
download | android_packages_apps_Trebuchet-440c360bc395c43683fa9ca226e59f9e35f9e926.tar.gz android_packages_apps_Trebuchet-440c360bc395c43683fa9ca226e59f9e35f9e926.tar.bz2 android_packages_apps_Trebuchet-440c360bc395c43683fa9ca226e59f9e35f9e926.zip |
Fix bug with drag visualization and UserFolders.
When dragging an app shortcut, it was possible that we'd show a red rectangle
around a cell occupied by a UserFolder. This shouldn't be possible -- as soon
as that cell becomes the target drop cell, the folder should start handling
the drag and drop events.
Change-Id: I1b7a8b1aa9aeb7e2f1bd51ce8d947c06455e988f
Diffstat (limited to 'src/com/android/launcher2/DropTarget.java')
-rw-r--r-- | src/com/android/launcher2/DropTarget.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/launcher2/DropTarget.java b/src/com/android/launcher2/DropTarget.java index 72eb33094..7e542312c 100644 --- a/src/com/android/launcher2/DropTarget.java +++ b/src/com/android/launcher2/DropTarget.java @@ -51,6 +51,26 @@ public interface DropTarget { DragView dragView, Object dragInfo); /** + * Allows a DropTarget to delegate drag and drop events to another object. + * + * Most subclasses will should just return null from this method. + * + * @param source DragSource where the drag started + * @param x X coordinate of the drop location + * @param y Y coordinate of the drop location + * @param xOffset Horizontal offset with the object being dragged where the original + * touch happened + * @param yOffset Vertical offset with the object being dragged where the original + * touch happened + * @param dragView The DragView that's being dragged around on screen. + * @param dragInfo Data associated with the object being dragged + * + * @return The DropTarget to delegate to, or null to not delegate to another object. + */ + DropTarget getDropTargetDelegate(DragSource source, int x, int y, int xOffset, int yOffset, + DragView dragView, Object dragInfo); + + /** * Check if a drop action can occur at, or near, the requested location. * This may be called repeatedly during a drag, so any calls should return * quickly. |