Fixing drag to application info button in All Apps
Change-Id: I6f31bf3ac24366791cf84830584846d57aab9b80
diff --git a/src/com/android/launcher2/DeleteZone.java b/src/com/android/launcher2/DeleteZone.java
index e8f160f..4acde1c 100644
--- a/src/com/android/launcher2/DeleteZone.java
+++ b/src/com/android/launcher2/DeleteZone.java
@@ -206,10 +206,15 @@
public void getHitRect(Rect outRect) {
super.getHitRect(outRect);
if (LauncherApplication.isScreenXLarge()) {
- outRect.top -= 50;
- outRect.left -= 50;
- outRect.bottom += 50;
- outRect.right += 50;
+ // TODO: This is a temporary hack. mManageVisiblity = false when you're in CAB mode.
+ // In that case, this icon is more tightly spaced next to the delete icon so we want
+ // it to have a smaller drag region. When the new drag&drop system comes in, we'll
+ // dispatch the drag/drop by calculating what target you're overlapping
+ final int dragPadding = mManageVisibility ? 50 : 10;
+ outRect.top -= dragPadding;
+ outRect.left -= dragPadding;
+ outRect.bottom += dragPadding;
+ outRect.right += dragPadding;
}
}