File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/com/android/launcher3/dragndrop Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ public class DragView extends View implements LauncherStateManager.StateListener
109109 private Path mScaledMaskPath ;
110110 private Drawable mBadge ;
111111 private ColorMatrixColorFilter mBaseFilter ;
112+ private boolean mShowSpringIcon ;
112113
113114 /**
114115 * Construct the drag view.
@@ -397,7 +398,7 @@ protected void onDraw(Canvas canvas) {
397398 }
398399 }
399400
400- if (mScaledMaskPath != null ) {
401+ if (mScaledMaskPath != null && mShowSpringIcon ) {
401402 int cnt = canvas .save ();
402403 canvas .clipPath (mScaledMaskPath );
403404 mBgSpringDrawable .draw (canvas );
@@ -516,6 +517,9 @@ public void cancelAnimation() {
516517 public void move (int touchX , int touchY ) {
517518 if (touchX > 0 && touchY > 0 && mLastTouchX > 0 && mLastTouchY > 0
518519 && mScaledMaskPath != null ) {
520+ if (mLastTouchX != touchX || mLastTouchY != touchY ) {
521+ mShowSpringIcon = true ;
522+ }
519523 mTranslateX .animateToPos (mLastTouchX - touchX );
520524 mTranslateY .animateToPos (mLastTouchY - touchY );
521525 }
You can’t perform that action at this time.
0 commit comments