diff options
author | Adam Cohen <adamcohen@google.com> | 2011-01-07 19:17:51 -0800 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2011-01-07 19:28:05 -0800 |
commit | c42d5e330a8bfb83be37cb5dec479e7a9b631f60 (patch) | |
tree | 8eaf7c0280a82e1a063d05810efb3fd7b6a68e71 /src/com/android/launcher2/CellLayout.java | |
parent | 304dcde0e301c2f1a0b2bdc80ea8617930691b6e (diff) | |
download | android_packages_apps_Trebuchet-c42d5e330a8bfb83be37cb5dec479e7a9b631f60.tar.gz android_packages_apps_Trebuchet-c42d5e330a8bfb83be37cb5dec479e7a9b631f60.tar.bz2 android_packages_apps_Trebuchet-c42d5e330a8bfb83be37cb5dec479e7a9b631f60.zip |
Fixing issue 3272864
-requestLayout() was being called within onLayout in
CellLayout. This resulted in some funky behaviour and the
bug above.
Change-Id: I76b8fa3c1dc7f08c462d13e2e9dde0d7a74386c0
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index fd1f0487b..2ddebe77f 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -949,7 +949,15 @@ public class CellLayout extends ViewGroup implements Dimmable { if (lp.animateDrop) { lp.animateDrop = false; - ((Workspace) mParent).animateViewIntoPosition(child); + + // This call needs to be posted since it results in a requestLayout() + // which shouldn't be called from within a layout pass (can cause a bad + // state of the tree). + post(new Runnable() { + public void run() { + ((Workspace) mParent).animateViewIntoPosition(child); + } + }); } } } |