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
109
109
private Path mScaledMaskPath ;
110
110
private Drawable mBadge ;
111
111
private ColorMatrixColorFilter mBaseFilter ;
112
+ private boolean mShowSpringIcon ;
112
113
113
114
/**
114
115
* Construct the drag view.
@@ -397,7 +398,7 @@ protected void onDraw(Canvas canvas) {
397
398
}
398
399
}
399
400
400
- if (mScaledMaskPath != null ) {
401
+ if (mScaledMaskPath != null && mShowSpringIcon ) {
401
402
int cnt = canvas .save ();
402
403
canvas .clipPath (mScaledMaskPath );
403
404
mBgSpringDrawable .draw (canvas );
@@ -516,6 +517,9 @@ public void cancelAnimation() {
516
517
public void move (int touchX , int touchY ) {
517
518
if (touchX > 0 && touchY > 0 && mLastTouchX > 0 && mLastTouchY > 0
518
519
&& mScaledMaskPath != null ) {
520
+ if (mLastTouchX != touchX || mLastTouchY != touchY ) {
521
+ mShowSpringIcon = true ;
522
+ }
519
523
mTranslateX .animateToPos (mLastTouchX - touchX );
520
524
mTranslateY .animateToPos (mLastTouchY - touchY );
521
525
}
You can’t perform that action at this time.
0 commit comments