diff options
-rw-r--r-- | res/xml/default_workspace.xml | 6 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/res/xml/default_workspace.xml b/res/xml/default_workspace.xml index 9189c76e4..0e96a6771 100644 --- a/res/xml/default_workspace.xml +++ b/res/xml/default_workspace.xml @@ -45,21 +45,21 @@ launcher:className="com.android.contacts.activities.DialtactsActivity" launcher:container="-101" launcher:screen="1" - launcher:x="0" + launcher:x="1" launcher:y="0" /> <favorite launcher:packageName="com.android.contacts" launcher:className="com.android.contacts.activities.PeopleActivity" launcher:container="-101" launcher:screen="2" - launcher:x="0" + launcher:x="2" launcher:y="0" /> <favorite launcher:packageName="com.android.browser" launcher:className="com.android.browser.BrowserActivity" launcher:container="-101" launcher:screen="3" - launcher:x="0" + launcher:x="3" launcher:y="0" /> </favorites> diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 5309423b7..b86fa4148 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -2120,8 +2120,12 @@ public class Workspace extends SmoothPagedView boolean createUserFolderIfNecessary(View newView, long container, CellLayout target, int[] targetCell, boolean external, DragView dragView, Runnable postAnimationRunnable) { View v = target.getChildAt(targetCell[0], targetCell[1]); - boolean hasntMoved = mDragInfo != null - && (mDragInfo.cellX == targetCell[0] && mDragInfo.cellY == targetCell[1]); + boolean hasntMoved = false; + if (mDragInfo != null) { + CellLayout cellParent = getParentCellLayoutForView(mDragInfo.cell); + hasntMoved = (mDragInfo.cellX == targetCell[0] && + mDragInfo.cellY == targetCell[1]) && (cellParent == target); + } if (v == null || hasntMoved || !mCreateUserFolderOnDrop) return false; mCreateUserFolderOnDrop = false; |