am 28f852ab: Fix drop animation issue in springloaded
* commit '28f852ab678d9750879b6d3549bf5da176cf1225': Fix drop animation issue in springloaded
This commit is contained in:
commit
4349d2d2fb
2 files changed
+8
-6
No files matched your search
@@ -480,7 +480,7 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void animateViewIntoPosition(DragView dragView, final View child) {
|
public void animateViewIntoPosition(DragView dragView, final View child) {
|
||||||
animateViewIntoPosition(dragView, child, null);
|
animateViewIntoPosition(dragView, child, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void animateViewIntoPosition(DragView dragView, final int[] pos, float alpha,
|
public void animateViewIntoPosition(DragView dragView, final int[] pos, float alpha,
|
||||||
@@ -496,8 +496,8 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void animateViewIntoPosition(DragView dragView, final View child,
|
public void animateViewIntoPosition(DragView dragView, final View child,
|
||||||
final Runnable onFinishAnimationRunnable) {
|
final Runnable onFinishAnimationRunnable, View anchorView) {
|
||||||
animateViewIntoPosition(dragView, child, -1, onFinishAnimationRunnable, null);
|
animateViewIntoPosition(dragView, child, -1, onFinishAnimationRunnable, anchorView);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void animateViewIntoPosition(DragView dragView, final View child, int duration,
|
public void animateViewIntoPosition(DragView dragView, final View child, int duration,
|
||||||
@@ -645,8 +645,10 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
|
|||||||
int x = (int) (fromLeft + Math.round(((to.left - fromLeft) * motionPercent)));
|
int x = (int) (fromLeft + Math.round(((to.left - fromLeft) * motionPercent)));
|
||||||
int y = (int) (fromTop + Math.round(((to.top - fromTop) * motionPercent)));
|
int y = (int) (fromTop + Math.round(((to.top - fromTop) * motionPercent)));
|
||||||
|
|
||||||
int xPos = x - mDropView.getScrollX() + (mAnchorView != null
|
int anchorAdjust = mAnchorView == null ? 0 : (int) (mAnchorView.getScaleX() *
|
||||||
? (mAnchorViewInitialScrollX - mAnchorView.getScrollX()) : 0);
|
(mAnchorViewInitialScrollX - mAnchorView.getScrollX()));
|
||||||
|
|
||||||
|
int xPos = x - mDropView.getScrollX() + anchorAdjust;
|
||||||
int yPos = y - mDropView.getScrollY();
|
int yPos = y - mDropView.getScrollY();
|
||||||
|
|
||||||
mDropView.setTranslationX(xPos);
|
mDropView.setTranslationX(xPos);
|
||||||
|
|||||||
@@ -3654,7 +3654,7 @@ public class Workspace extends SmoothPagedView
|
|||||||
// the correct final location.
|
// the correct final location.
|
||||||
setFinalTransitionTransform(cellLayout);
|
setFinalTransitionTransform(cellLayout);
|
||||||
mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, view,
|
mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, view,
|
||||||
exitSpringLoadedRunnable);
|
exitSpringLoadedRunnable, this);
|
||||||
resetTransitionTransform(cellLayout);
|
resetTransitionTransform(cellLayout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user