mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Simplifying the drop animation code" into sc-v2-dev
This commit is contained in:
@@ -243,11 +243,8 @@ public abstract class ButtonDropTarget extends TextView
|
||||
return;
|
||||
}
|
||||
final DragLayer dragLayer = mLauncher.getDragLayer();
|
||||
final Rect from = new Rect();
|
||||
dragLayer.getViewRectRelativeToSelf(d.dragView, from);
|
||||
|
||||
final Rect to = getIconRect(d);
|
||||
final float scale = (float) to.width() / from.width();
|
||||
final float scale = (float) to.width() / d.dragView.getMeasuredWidth();
|
||||
d.dragView.detachContentView(/* reattachToPreviousParent= */ true);
|
||||
mDropTargetBar.deferOnDragEnd();
|
||||
|
||||
@@ -257,9 +254,9 @@ public abstract class ButtonDropTarget extends TextView
|
||||
mLauncher.getStateManager().goToState(NORMAL);
|
||||
};
|
||||
|
||||
dragLayer.animateView(d.dragView, from, to, scale, 1f, 1f, 0.1f, 0.1f,
|
||||
dragLayer.animateView(d.dragView, to, scale, 0.1f, 0.1f,
|
||||
DRAG_VIEW_DROP_DURATION,
|
||||
Interpolators.DEACCEL_2, Interpolators.LINEAR, onAnimationEndRunnable,
|
||||
Interpolators.DEACCEL_2, onAnimationEndRunnable,
|
||||
DragLayer.ANIMATION_END_DISAPPEAR, null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user