mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Prevent flicker when starting a drag.
Also, animate item the view to its new position when dragging.
This commit is contained in:
@@ -311,6 +311,10 @@ public class CustomizePagedView extends PagedView
|
||||
mLauncher.getWorkspace().onDragStopped();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDragViewVisible() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// Return early if this is not initiated from a touch
|
||||
@@ -490,16 +494,14 @@ public class CustomizePagedView extends PagedView
|
||||
|
||||
mLauncher.getWorkspace().onDragStartedWithItemMinSize(
|
||||
createWidgetInfo.minWidth, createWidgetInfo.minHeight);
|
||||
mDragController.startDrag(v, b, this, createWidgetInfo, DragController.DRAG_ACTION_COPY,
|
||||
null);
|
||||
mDragController.startDrag(v, b, this, createWidgetInfo, DragController.DRAG_ACTION_COPY, null);
|
||||
|
||||
// Cleanup the icon
|
||||
b.recycle();
|
||||
return true;
|
||||
case ShortcutCustomization:
|
||||
createItemInfo = (PendingAddItemInfo) v.getTag();
|
||||
mDragController.startDrag(
|
||||
v, this, createItemInfo, DragController.DRAG_ACTION_COPY, null);
|
||||
mDragController.startDrag(v, this, createItemInfo, DragController.DRAG_ACTION_COPY);
|
||||
mLauncher.getWorkspace().onDragStartedWithItemSpans(1, 1);
|
||||
return true;
|
||||
case ApplicationCustomization:
|
||||
|
||||
Reference in New Issue
Block a user