Long-press on an app to reveal its shortcuts.
- Add ShortcutsContainerListener to icons on workspace, folders, and
all apps. This handles long-press and forwards following touches to
the DeepShortcutsContainer that is created.
- Drag over shortcut before lifting finger to launch it.
- Shortcuts are rendered in pill-shaped DeepShortcutViews,
which are inside DeepShortcutContainer on DragLayer.
- The shortcut container orients above or below the icon, and left or
right-aligns with it. Biases for above + left-align.
- Long press a DeepShortcutPill to drag and pin it to the workspace.
Bug: 28980830
Change-Id: I08658d13ae51fe53064644e8d8f7b42f150fdd7d
diff --git a/src/com/android/launcher3/CheckLongPressHelper.java b/src/com/android/launcher3/CheckLongPressHelper.java
index 483c622..dde733c 100644
--- a/src/com/android/launcher3/CheckLongPressHelper.java
+++ b/src/com/android/launcher3/CheckLongPressHelper.java
@@ -22,10 +22,12 @@
public class CheckLongPressHelper {
+ public static final int DEFAULT_LONG_PRESS_TIMEOUT = 300;
+
@Thunk View mView;
@Thunk View.OnLongClickListener mListener;
@Thunk boolean mHasPerformedLongPress;
- private int mLongPressTimeout = 300;
+ private int mLongPressTimeout = DEFAULT_LONG_PRESS_TIMEOUT;
private CheckForLongPress mPendingCheckForLongPress;
class CheckForLongPress implements Runnable {