diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java index e8f1ac96ba..92cabe5a49 100644 --- a/src/com/android/launcher2/Folder.java +++ b/src/com/android/launcher2/Folder.java @@ -323,7 +323,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList int rhIndex = rhs.cellY * mNumCols + rhs.cellX; return (lhIndex - rhIndex); } - } private void placeInReadingOrder(ArrayList items) { @@ -335,7 +334,8 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList maxX = item.cellX; } } - GridComparator gridComparator = new GridComparator(maxX); + + GridComparator gridComparator = new GridComparator(maxX + 1); Collections.sort(items, gridComparator); final int countX = mContent.getCountX(); for (int i = 0; i < count; i++) { @@ -383,6 +383,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList } else { mFolderName.setText(""); } + updateItemLocationsInDatabase(); } /**