Add quick launch: a swipe past the first or last home page opens a chosen app
Swiping on from the first home screen page, towards the page that is not there, now does what the owner chose under Settings, Gestures, Quick launch: open an app, or any other of the launcher's gesture actions. The last page has a choice of its own. The stretch the pages already show at either end is an edge effect; quick launch replaces it with one that also counts how far the finger has pulled. Lifting the finger after a pull of about a seventh of the screen, or after a flick, does the action; a short pull or one that is taken back does nothing. An app opens out of the screen edge the finger pulled from. From Android 12, where the stretch is Android's own. Infinite scrolling takes those swipes for itself, so the two do not combine. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
b696a376b2
commit
fba65e091f
5 files changed
+214
-1
No files matched your search
@@ -372,6 +372,13 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
|
||||
setHapticFeedbackEnabled(false);
|
||||
initWorkspace();
|
||||
// Flexera Launcher: quick launch. The stretch at either end of the pages doubles as a
|
||||
// gesture that opens an app the owner has chosen (app.flexera.home.QuickLaunch). From
|
||||
// Android 12, where that stretch is Android's own; before, Lawnchair draws one itself.
|
||||
if (Utilities.ATLEAST_S) {
|
||||
mEdgeGlowLeft = app.flexera.home.QuickLaunch.edgeEffect(this, mLauncher, true, mIsRtl);
|
||||
mEdgeGlowRight = app.flexera.home.QuickLaunch.edgeEffect(this, mLauncher, false, mIsRtl);
|
||||
}
|
||||
|
||||
// Disable multitouch across the workspace/all apps/customize tray
|
||||
setMotionEventSplittingEnabled(true);
|
||||
@@ -1476,7 +1483,10 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
public void setLauncherOverlay(LauncherOverlayTouchProxy overlay) {
|
||||
final EdgeEffectCompat newEffect;
|
||||
if (overlay == null) {
|
||||
newEffect = new EdgeEffectCompat(getContext());
|
||||
// Flexera Launcher: without a feed, the first page's end is quick launch again.
|
||||
newEffect = Utilities.ATLEAST_S
|
||||
? app.flexera.home.QuickLaunch.edgeEffect(this, mLauncher, !mIsRtl, mIsRtl)
|
||||
: new EdgeEffectCompat(getContext());
|
||||
mOverlayEdgeEffect = null;
|
||||
} else {
|
||||
newEffect = mOverlayEdgeEffect = new OverlayEdgeEffect(getContext(), overlay);
|
||||
|
||||
Reference in new issue
Block a user