mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Simplifying workspace layout
Instead of creating workspace view larger than the screen size (so that it can be zoomed out), restricting the size to the parent size and bypassing the drag events directly to Workspace (since the workspace is smaller when zoomed out, it might not qualify for all events otherwise). Change-Id: I45e213dd6d16bec5feb6e7cf90bc6f7de4c6d305
This commit is contained in:
@@ -53,6 +53,7 @@ import com.android.launcher3.util.Thunk;
|
||||
public abstract class ButtonDropTarget extends TextView
|
||||
implements DropTarget, DragController.DragListener, OnClickListener {
|
||||
|
||||
private static final int[] sTempCords = new int[2];
|
||||
private static final int DRAG_VIEW_DROP_DURATION = 285;
|
||||
|
||||
private final boolean mHideParentOnDisable;
|
||||
@@ -257,9 +258,9 @@ public abstract class ButtonDropTarget extends TextView
|
||||
super.getHitRect(outRect);
|
||||
outRect.bottom += mBottomDragPadding;
|
||||
|
||||
int[] coords = new int[2];
|
||||
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, coords);
|
||||
outRect.offsetTo(coords[0], coords[1]);
|
||||
sTempCords[0] = sTempCords[1] = 0;
|
||||
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, sTempCords);
|
||||
outRect.offsetTo(sTempCords[0], sTempCords[1]);
|
||||
}
|
||||
|
||||
public Rect getIconRect(DragObject dragObject) {
|
||||
|
||||
Reference in New Issue
Block a user