mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Fix bug where icon 'jumps' on long press.
Bug: 76155869 Change-Id: I739b00564b0ebe00b3aff326b3c1d62deea9d1d3
This commit is contained in:
committed by
Jonathan Miranda
parent
159d6949a1
commit
31942e788b
@@ -1552,6 +1552,14 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
|
||||
public DragView beginDragShared(View child, DragSource source, ItemInfo dragObject,
|
||||
DragPreviewProvider previewProvider, DragOptions dragOptions) {
|
||||
float iconScale = 1f;
|
||||
if (child instanceof BubbleTextView) {
|
||||
Drawable icon = ((BubbleTextView) child).getIcon();
|
||||
if (icon instanceof FastBitmapDrawable) {
|
||||
iconScale = ((FastBitmapDrawable) icon).getAnimatedScale();
|
||||
}
|
||||
}
|
||||
|
||||
child.clearFocus();
|
||||
child.setPressed(false);
|
||||
mOutlineProvider = previewProvider;
|
||||
@@ -1603,7 +1611,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
}
|
||||
|
||||
DragView dv = mDragController.startDrag(b, dragLayerX, dragLayerY, source,
|
||||
dragObject, dragVisualizeOffset, dragRect, scale, dragOptions);
|
||||
dragObject, dragVisualizeOffset, dragRect, scale * iconScale, scale, dragOptions);
|
||||
dv.setIntrinsicIconScaleFactor(dragOptions.intrinsicIconScaleFactor);
|
||||
return dv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user