summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/CellLayout.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2012-03-27 16:45:39 -0700
committerAdam Cohen <adamcohen@google.com>2012-03-27 16:54:39 -0700
commitea889a294be004f4b1c21e9b874f9e63abfb8bd6 (patch)
treef9036bfcc382043530273e9c0f67cfcefb2e3454 /src/com/android/launcher2/CellLayout.java
parent6a2a2899f79408f5123c860f2c6b06d150a10b0b (diff)
downloadandroid_packages_apps_Trebuchet-ea889a294be004f4b1c21e9b874f9e63abfb8bd6.tar.gz
android_packages_apps_Trebuchet-ea889a294be004f4b1c21e9b874f9e63abfb8bd6.tar.bz2
android_packages_apps_Trebuchet-ea889a294be004f4b1c21e9b874f9e63abfb8bd6.zip
Fix non-persistence of launcher (broken by reordering changes)
Change-Id: I6fb9cb2257844e642df9b5599188b1cfce35df9b
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r--src/com/android/launcher2/CellLayout.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 01ab8ec03..ce914e17a 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -2067,10 +2067,14 @@ public class CellLayout extends ViewGroup {
}
int childCount = mShortcutsAndWidgets.getChildCount();
for (int i = 0; i < childCount; i++) {
- LayoutParams lp = (LayoutParams) mShortcutsAndWidgets.getChildAt(i).getLayoutParams();
- lp.cellX = lp.tmpCellX;
- lp.cellY = lp.tmpCellY;
+ View child = mShortcutsAndWidgets.getChildAt(i);
+ LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ ItemInfo info = (ItemInfo) child.getTag();
+ info.cellX = lp.cellX = lp.tmpCellX;
+ info.cellY = lp.cellY = lp.tmpCellY;
}
+ Workspace workspace = (Workspace) getParent();
+ workspace.updateItemLocationsInDatabase(this);
}
public void setUseTempCoords(boolean useTempCoords) {