diff options
author | Adam Cohen <adamcohen@google.com> | 2011-01-10 11:01:49 -0800 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2011-01-10 11:05:14 -0800 |
commit | df9de0b121973bb59f4b8a74ade3000ec201c503 (patch) | |
tree | 9b6dfd56aa325cd8bbbbb74bc992baa54754167e /src/com/android/launcher2/CellLayout.java | |
parent | 99b6a5b5f7808291e26f98ee8064bd9f288c3feb (diff) | |
download | android_packages_apps_Trebuchet-df9de0b121973bb59f4b8a74ade3000ec201c503.tar.gz android_packages_apps_Trebuchet-df9de0b121973bb59f4b8a74ade3000ec201c503.tar.bz2 android_packages_apps_Trebuchet-df9de0b121973bb59f4b8a74ade3000ec201c503.zip |
Fixing bug with workspace drop animation
Change-Id: I4f7682e588730905170fd534a415688ebbf64eea
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 2359e322a..1173e52f2 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -963,14 +963,10 @@ public class CellLayout extends ViewGroup implements Dimmable, VisibilityChanged if (lp.animateDrop) { lp.animateDrop = false; - // 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); - } - }); + // This call does not result in a requestLayout(), but at one point did. + // We need to be cautious about any method calls within the layout pass + // to insure we don't leave the view tree in a bad state. + ((Workspace) mParent).animateViewIntoPosition(child); } } } @@ -1392,7 +1388,7 @@ public class CellLayout extends ViewGroup implements Dimmable, VisibilityChanged lp.isDragging = false; lp.dropped = true; lp.animateDrop = animate; - child.setVisibility(View.VISIBLE); + child.setVisibility(View.INVISIBLE); child.requestLayout(); } } |