OSDN Git Service

Solve fling-to-delete bug
authorMichael Jurka <mikejurka@google.com>
Sat, 14 Sep 2013 16:08:26 +0000 (18:08 +0200)
committerMichael Jurka <mikejurka@google.com>
Sat, 14 Sep 2013 16:08:46 +0000 (18:08 +0200)
Delete target didn't hide after a fling because
onDragEnd was being called twice

src/com/android/launcher3/DeleteDropTarget.java
src/com/android/launcher3/SearchDropTargetBar.java

index dce18fe..5705e38 100644 (file)
@@ -509,8 +509,6 @@ public class DeleteDropTarget extends ButtonDropTarget {
         Runnable onAnimationEndRunnable = new Runnable() {
             @Override
             public void run() {
-                mSearchDropTargetBar.onDragEnd();
-
                 // If we are dragging from AllApps, then we allow AppsCustomizePagedView to clean up
                 // itself, otherwise, complete the drop to initiate the deletion process
                 if (!isAllApps) {
index 0a0861f..e681aa1 100644 (file)
@@ -23,13 +23,10 @@ import android.content.Context;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.view.animation.AccelerateInterpolator;
 import android.widget.FrameLayout;
 
-import com.android.launcher3.R;
-
 /*
  * Ths bar will manage the transition between the QSB search bar and the delete drop
  * targets so that each of the individual IconDropTargets don't have to.