feat: Vertical icon swipe gesture (#6958)

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
Pun Butrach authored and GitHub committed 2026-07-05 12:25:18 +00:00
1 parent 5e053164b7
commit 1e240d94e4
7 files changed
+58 -4

No files matched your search

+12 -4
View File
@@ -1199,8 +1199,8 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
private boolean shouldSkipPagedViewInterceptionForIconSwipe(MotionEvent ev) {
switch (ev.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
mDisallowPagedViewInterceptForIconSwipe = isTouchOnIconWithHorizontalSwipeGesture(
ev.getX(), ev.getY());
mDisallowPagedViewInterceptForIconSwipe = isTouchOnIconWithSwipeGesture(
ev.getX(), ev.getY(), false);
if (mDisallowPagedViewInterceptForIconSwipe) {
resetTouchState();
return true;
@@ -1225,9 +1225,17 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
}
// Lawnchair: Icon swipe gesture feature
private boolean isTouchOnIconWithHorizontalSwipeGesture(float x, float y) {
public boolean isTouchOnIconWithSwipeGesture(float x, float y, boolean vertical) {
boolean hasConfiguredIconSwipeGesture = false;
BubbleTextView touchedIcon = findIconAtPosition(x, y);
return touchedIcon != null && touchedIcon.hasConfiguredHorizontalIconSwipeGesture();
if (touchedIcon != null) {
if (vertical) {
hasConfiguredIconSwipeGesture = touchedIcon.hasConfiguredVerticalIconSwipeGesture();
} else {
hasConfiguredIconSwipeGesture = touchedIcon.hasConfiguredHorizontalIconSwipeGesture();
}
}
return hasConfiguredIconSwipeGesture;
}
// Lawnchair: Icon swipe gesture feature