summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Folder.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2011-07-20 15:45:11 -0700
committerAdam Cohen <adamcohen@google.com>2011-07-20 17:59:04 -0700
commitfc53cd22c9a78708c78c85946443f23ec8c59502 (patch)
treea61a0f1ffd4729401c65a1a9d36f20593100fe8a /src/com/android/launcher2/Folder.java
parentd8ff0e68e8a5184b59876e987dc5e65b2f82baf5 (diff)
downloadandroid_packages_apps_Trebuchet-fc53cd22c9a78708c78c85946443f23ec8c59502.tar.gz
android_packages_apps_Trebuchet-fc53cd22c9a78708c78c85946443f23ec8c59502.tar.bz2
android_packages_apps_Trebuchet-fc53cd22c9a78708c78c85946443f23ec8c59502.zip
Fixing a couple bugs, allapps clicks and weird crash
-> issue 5021897 (when this was fixed, exposed more bugginess that is now fixed) -> issue 5038392 Change-Id: I49a4e9fca154f75ea22ad2c462641747536102ce
Diffstat (limited to 'src/com/android/launcher2/Folder.java')
-rw-r--r--src/com/android/launcher2/Folder.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index 96cd22b56..d3b5d4171 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -214,15 +214,13 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
mEmptyCell[0] = item.cellX;
mEmptyCell[1] = item.cellY;
mCurrentDragView = v;
+
+ mContent.removeView(mCurrentDragView);
+ mInfo.remove(mCurrentDragInfo);
}
return true;
}
- public void onDragViewVisible() {
- mContent.removeView(mCurrentDragView);
- mInfo.remove(mCurrentDragInfo);
- }
-
public boolean isEditingName() {
return mIsEditingName;
}
@@ -890,7 +888,11 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
si.cellX = lp.cellX = mEmptyCell[0];
si.cellX = lp.cellY = mEmptyCell[1];
mContent.addViewToCellLayout(mCurrentDragView, -1, (int)item.id, lp, true);
- mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, mCurrentDragView);
+ if (d.dragView.hasDrawn()) {
+ mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, mCurrentDragView);
+ } else {
+ mCurrentDragView.setVisibility(VISIBLE);
+ }
mItemsInvalidated = true;
setupContentDimension(getItemCount());
mSuppressOnAdd = true;