mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Fixing broken accessibility drag
> Allow touch events on hotseat while in accessible drag as drag now happens in spring loaded state. > Allow drop target buttons to ignore thershold check when in accessibility drag Bug: 30900444 Change-Id: I88274367983fc027b2ddde3a719ca943f4f48587
This commit is contained in:
@@ -62,6 +62,8 @@ public abstract class ButtonDropTarget extends TextView
|
||||
|
||||
/** Whether this drop target is active for the current drag */
|
||||
protected boolean mActive;
|
||||
/** Whether an accessible drag is in progress */
|
||||
private boolean mAccessibleDrag;
|
||||
/** An item must be dragged at least this many pixels before this drop target is enabled. */
|
||||
private final int mDragDistanceThreshold;
|
||||
|
||||
@@ -218,8 +220,8 @@ public abstract class ButtonDropTarget extends TextView
|
||||
|
||||
@Override
|
||||
public boolean isDropEnabled() {
|
||||
return mActive
|
||||
&& mLauncher.getDragController().getDistanceDragged() >= mDragDistanceThreshold;
|
||||
return mActive && (mAccessibleDrag ||
|
||||
mLauncher.getDragController().getDistanceDragged() >= mDragDistanceThreshold);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -307,6 +309,7 @@ public abstract class ButtonDropTarget extends TextView
|
||||
}
|
||||
|
||||
public void enableAccessibleDrag(boolean enable) {
|
||||
mAccessibleDrag = enable;
|
||||
setOnClickListener(enable ? this : null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user