diff options
author | Adam Cohen <adamcohen@google.com> | 2012-05-10 16:51:52 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2012-05-10 16:52:25 -0700 |
commit | f1dcdf61132a6321d0c1c0eb670c6cf1493ab981 (patch) | |
tree | e6ef58bb269e04d1076664a95338b4ca2ab69da2 /src | |
parent | 50ead3b2e8049fc3fd31f14a6151a1b5037bb834 (diff) | |
download | android_packages_apps_Trebuchet-f1dcdf61132a6321d0c1c0eb670c6cf1493ab981.tar.gz android_packages_apps_Trebuchet-f1dcdf61132a6321d0c1c0eb670c6cf1493ab981.tar.bz2 android_packages_apps_Trebuchet-f1dcdf61132a6321d0c1c0eb670c6cf1493ab981.zip |
Fixing widget overlapping another widget (issue 6475997)
Change-Id: Ic78afc0ef5a2eab2278feb080f6b81d4b2baaed2
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 21872b914..2518c6c66 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -566,7 +566,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen mLauncher.getWorkspace().beginDragShared(v, this); } - private void loadWidgetInBackground(final PendingAddWidgetInfo info) { + private void preloadWidget(final PendingAddWidgetInfo info) { final AppWidgetProviderInfo pInfo = info.info; if (pInfo.configure != null) { return; @@ -613,7 +613,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen // We are anticipating a long press, and we use this time to load bind and instantiate // the widget. This will need to be cleaned up if it turns out no long press occurs. mCreateWidgetInfo = new PendingAddWidgetInfo((PendingAddWidgetInfo) v.getTag()); - loadWidgetInBackground(mCreateWidgetInfo); + preloadWidget(mCreateWidgetInfo); } private void cleanupWidgetPreloading() { diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index ece187023..e4b5af3b5 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -2010,7 +2010,7 @@ public class CellLayout extends ViewGroup { ObjectAnimator.ofFloat(child, "scaleX", 1f), ObjectAnimator.ofFloat(child, "scaleY", 1f), ObjectAnimator.ofFloat(child, "translationX", 0f), - ObjectAnimator.ofFloat(child, "translationX", 0f) + ObjectAnimator.ofFloat(child, "translationY", 0f) ); s.setDuration(REORDER_ANIMATION_DURATION); s.setInterpolator(new android.view.animation.DecelerateInterpolator(1.5f)); diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index fd9cc5726..3910c45cf 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -2244,6 +2244,8 @@ public class Workspace extends SmoothPagedView CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams(); mTargetCell[0] = lp.cellX; mTargetCell[1] = lp.cellY; + CellLayout layout = (CellLayout) cell.getParent().getParent(); + layout.markCellsAsOccupiedForView(cell); } } |