diff options
author | Michael Jurka <mikejurka@google.com> | 2010-09-17 15:00:07 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2010-09-24 15:28:20 -0700 |
commit | 0280c3be4d9f8fc6fdf015b7ecd276eb26f76f2d (patch) | |
tree | ffebcc83e7c161dac612463d15882f9b83e6f591 /src/com/android/launcher2/DragController.java | |
parent | 513b8c94fb1dc3af246fcc8a7f8c0dd593d86cbd (diff) | |
download | packages_apps_trebuchet-0280c3be4d9f8fc6fdf015b7ecd276eb26f76f2d.zip packages_apps_trebuchet-0280c3be4d9f8fc6fdf015b7ecd276eb26f76f2d.tar.gz packages_apps_trebuchet-0280c3be4d9f8fc6fdf015b7ecd276eb26f76f2d.tar.bz2 |
Adding support for drag and drop of folders and shortcuts.
also:
- Long press on empty space on workspace now brings up customization tray
- Fixed: while dragging, items appeared to be dropping on folders two cells to the right
- Fixed: Disabling drops on folders when the workspace is shrunken
- Fixed: account for scaling of dragged items when checking if they overlap
with shrunken workspace screens
- Making folder icons dimmable to match shortcuts and widgets
- When deciding with shrunken workspace screen we're dragging to, we now use the closest screen rather than the one that has been overlapped the most
- Refactored drag/add mechanism, removing array of occupied cells from CellInfo
- Removed dead code/variables
Diffstat (limited to 'src/com/android/launcher2/DragController.java')
-rw-r--r-- | src/com/android/launcher2/DragController.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java index 7fc905b..87b3473 100644 --- a/src/com/android/launcher2/DragController.java +++ b/src/com/android/launcher2/DragController.java @@ -18,16 +18,17 @@ package com.android.launcher2; import android.content.Context; import android.graphics.Bitmap; +import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.RectF; -import android.os.IBinder; import android.os.Handler; +import android.os.IBinder; import android.os.Vibrator; import android.util.DisplayMetrics; import android.util.Log; -import android.view.View; import android.view.KeyEvent; import android.view.MotionEvent; +import android.view.View; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; @@ -568,6 +569,9 @@ public class DragController { final int count = dropTargets.size(); for (int i=count-1; i>=0; i--) { DropTarget target = dropTargets.get(i); + if (!target.isDropEnabled()) + continue; + target.getHitRect(r); // Convert the hit rect to screen coordinates |