mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
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
This commit is contained in:
@@ -67,6 +67,7 @@ public class BubbleTextView extends TextView
|
||||
private final Launcher mLauncher;
|
||||
private Drawable mIcon;
|
||||
private final Drawable mBackground;
|
||||
private OnLongClickListener mOnLongClickListener;
|
||||
private final CheckLongPressHelper mLongPressHelper;
|
||||
private final HolographicOutlineHelper mOutlineHelper;
|
||||
private final StylusEventHelper mStylusEventHelper;
|
||||
@@ -270,6 +271,16 @@ public class BubbleTextView extends TextView
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnLongClickListener(OnLongClickListener l) {
|
||||
super.setOnLongClickListener(l);
|
||||
mOnLongClickListener = l;
|
||||
}
|
||||
|
||||
public OnLongClickListener getOnLongClickListener() {
|
||||
return mOnLongClickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
// Call the superclass onTouchEvent first, because sometimes it changes the state to
|
||||
|
||||
Reference in New Issue
Block a user