OSDN Git Service

Ensuring that the widget drag outline is padded by the default widget padding. (Bug...
authorWinson Chung <winsonc@google.com>
Tue, 8 Oct 2013 21:01:06 +0000 (14:01 -0700)
committerWinson Chung <winsonc@google.com>
Tue, 8 Oct 2013 22:51:37 +0000 (15:51 -0700)
Change-Id: I8d613104d07e64e55f31f777d222a2ecaccb0adc

src/com/android/launcher3/Launcher.java
src/com/android/launcher3/Workspace.java

index cfa5545..7aceb41 100644 (file)
@@ -3931,8 +3931,7 @@ public class Launcher extends Activity
                 mIntentsOnWorkspaceFromUpgradePath = null;
             }
         } else {
-            if (!AppsCustomizePagedView.DISABLE_ALL_APPS &&
-                    mAppsCustomizeContent != null) {
+            if (mAppsCustomizeContent != null) {
                 mAppsCustomizeContent.setApps(apps);
             }
         }
index b9552ea..d7d17ed 100644 (file)
@@ -338,7 +338,8 @@ public class Workspace extends SmoothPagedView
             ItemInfo itemInfo, boolean springLoaded) {
         int[] size = new int[2];
         if (getChildCount() > 0) {
-            CellLayout cl = (CellLayout) mLauncher.getWorkspace().getChildAt(0);
+            // Use the first non-custom page to estimate the child position
+            CellLayout cl = (CellLayout) getChildAt(numCustomPages());
             Rect r = estimateItemPosition(cl, itemInfo, 0, 0, hSpan, vSpan);
             size[0] = r.width();
             size[1] = r.height();