summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AllApps3D.java
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2011-02-18 14:35:21 -0800
committerPatrick Dubroy <dubroy@google.com>2011-02-18 20:03:59 -0800
commit5f445425606b2c27276a79e9e871cf7f67b1b719 (patch)
tree51e130898b544bdc098fb67f32a6dfcdbb1c9150 /src/com/android/launcher2/AllApps3D.java
parenta88b213087ea46060bbbebbae52e069b873f3097 (diff)
downloadandroid_packages_apps_Trebuchet-5f445425606b2c27276a79e9e871cf7f67b1b719.tar.gz
android_packages_apps_Trebuchet-5f445425606b2c27276a79e9e871cf7f67b1b719.tar.bz2
android_packages_apps_Trebuchet-5f445425606b2c27276a79e9e871cf7f67b1b719.zip
Add missing animations when dragging from customize.
- Fix 3453751: Moon landing on canceled drag from customize - Fix 3453595: Use home screen "consume" animation when dragging and dropping Change-Id: Ia6a83c2d7a8f24c3ce02811547a35a7022d245f6
Diffstat (limited to 'src/com/android/launcher2/AllApps3D.java')
-rw-r--r--src/com/android/launcher2/AllApps3D.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java
index 2ecf761fd..29f49afc2 100644
--- a/src/com/android/launcher2/AllApps3D.java
+++ b/src/com/android/launcher2/AllApps3D.java
@@ -685,16 +685,14 @@ public class AllApps3D extends RSSurfaceView
&& mCurrentIconIndex >= 0 && mCurrentIconIndex < mAllAppsList.size()) {
ApplicationInfo app = mAllAppsList.get(mCurrentIconIndex);
- Bitmap bmp = app.iconBitmap;
- final int w = bmp.getWidth();
- final int h = bmp.getHeight();
+ final Bitmap bmp = app.iconBitmap;
// We don't really have an accurate location to use. This will do.
- int screenX = mMotionDownRawX - (w / 2);
- int screenY = mMotionDownRawY - h;
+ int screenX = mMotionDownRawX - (bmp.getWidth() / 2);
+ int screenY = mMotionDownRawY - bmp.getHeight();
- mDragController.startDrag(bmp, screenX, screenY,
- 0, 0, w, h, this, app, DragController.DRAG_ACTION_COPY);
+ mDragController.startDrag(
+ bmp, screenX, screenY, this, app, DragController.DRAG_ACTION_COPY);
mLauncher.closeAllApps(true);
}
@@ -748,7 +746,7 @@ public class AllApps3D extends RSSurfaceView
}
@Override
- public void onDropCompleted(View target, boolean success) {
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
}
/**