Separate animations and add dragOffSet points in dragOptions
For 1, when animateShift() is called shiftAnimation() is the only thing needed. 2, by having point saved in preDragCondition, we can use that to update the drag layers and not have to modify registrationX/Y later Removed dragVisualizedOffset since it does not do anything. There is an issue that also needs to be fixed if user decides to long click on a search result and let go, the icon flashes at the touch point when you let go.. so we check when mContent can be shown in DragView depending on if there is dragOffset. If there is dragOffset, set mContent to invisible. If there is no dragOffset, set mContent to visible because it doesn't matter as the original content is at the same spot. bug: 245659929 test: manual: video: https://drive.google.com/file/d/1JQ0pud31HU0WlrqecX0v1cdPKQ37jQCf/view?usp=sharing Change-Id: I4d2276b9c43e1e92c45d8538b8dde70baa84a5e8
This commit is contained in:
1 parent
fda9f3d430
commit
e63401e711
10 files changed
+81
-62
No files matched your search
@@ -198,7 +198,7 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im
|
||||
|
||||
@Override
|
||||
public boolean shouldStartDrag(double distanceDragged) {
|
||||
return mDragView != null && mDragView.isAnimationFinished();
|
||||
return mDragView != null && mDragView.isScaleAnimationFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -231,7 +231,6 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im
|
||||
dragLayerY,
|
||||
(View target, DropTarget.DragObject d, boolean success) -> {} /* DragSource */,
|
||||
(ItemInfo) btv.getTag(),
|
||||
/* dragVisualizeOffset = */ null,
|
||||
dragRect,
|
||||
scale * iconScale,
|
||||
scale,
|
||||
@@ -241,7 +240,7 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im
|
||||
@Override
|
||||
protected DragView startDrag(@Nullable Drawable drawable, @Nullable View view,
|
||||
DraggableView originalView, int dragLayerX, int dragLayerY, DragSource source,
|
||||
ItemInfo dragInfo, Point dragOffset, Rect dragRegion, float initialDragViewScale,
|
||||
ItemInfo dragInfo, Rect dragRegion, float initialDragViewScale,
|
||||
float dragViewScaleOnDrop, DragOptions options) {
|
||||
mOptions = options;
|
||||
|
||||
|
||||
Reference in new issue
Block a user