You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users across Messages, Phone, and Contacts have frequently requested horizontal swipe gestures on list items (e.g., swipe to archive/delete messages, call/SMS in call logs and contacts).
Previously these requests put on hold with needs triage for two very valid architectural reasons:
Cross App UI/UX Consistency: The interaction pattern must be consistent and unified across the entire suite via org.fossify:commons
ViewPager Conflict: In Phone and Contacts, the main screen hosts tabs inside MyViewPager. When a user drags horizontally on a list item, ViewPager.onInterceptTouchEvent() intercepts the horizontal touch and switches tabs instead of swiping the list item.
2. Proposed Modes to Resolve
Swipe Gesture Preference to be added in Settings, and it can be set to these modes :
Mode 0: Off (No Gesture)
Mode 1: Swipe for switching between tabs (Default)
Mode 2: Swipe for executing Action
view_pager.isPagingEnabled = false.
Items in list can be swiped left & right to execute the action
These actions are fully configurable.
Tab navigation is handled by tapping the bottom tab icons in TabLayout.
Mode 3: Screen Area Distribution for Swipe
The screen width is partitioned into distinct horizontal interaction zones:
Left (~20%): Swipe Action
Center (~60%): ViewPager Tab Switch
Right (~20%): Swipe Action
When gesture starts in the center of the screen: The touch is delegated to MyViewPager to allow horizontal tab switching.
When gesture starts in the edges: Touch interception by ViewPager and executes the swipe action (configurable) on item.
OR BOTH 2 & 3 given as option
They can share same action configurable prefrence.
3. commons & Apps
Implementation strictly separates the gesture mechanism from the app policies:
A. In org.fossify:commons
SwipeActionHelper:
Implements the selected mode logic.
Angle & velocity gating: Only recognizes horizontal swipes when it passes a threshold.
Respects the central gesture configuration mode.
BaseConfig Preferences:
Centralizes swipeGestureMode (options: Off, Mode 1: Swipe for switching between tabs, Mode 2: Swipe for executing Action, Mode 3: Screen Area Distribution for Swipe),
swipeLeftAction, and swipeRightAction configuration
B. In Individual Apps (The Policies)
Messages:
Attach SwipeActionHelper to ConversationsAdapter
Left/Right swipe triggers Archive or Delete (configurable).
Actions can be paired with an immediate Snackbar containing an UNDO action.
Phone:
Attach SwipeActionHelper to RecentCallsAdapter and Contacts tab list.
Swiping Right initiates action like a call directly.
Contacts:
Attach SwipeActionHelper to ContactsAdapter for quick Call/SMS/Other actions.
Other Apps (Gallery, Notes, File Manager):
Follows the global swipeGestureMode preference; defaults to Mode 1 (tab switching) or disabled depending on app layout.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Related Issues:
1. Context
Users across Messages, Phone, and Contacts have frequently requested horizontal swipe gestures on list items (e.g., swipe to archive/delete messages, call/SMS in call logs and contacts).
Previously these requests put on hold with
needs triagefor two very valid architectural reasons:Cross App UI/UX Consistency: The interaction pattern must be consistent and unified across the entire suite via
org.fossify:commonsViewPager Conflict: In
PhoneandContacts, the main screen hosts tabs insideMyViewPager. When a user drags horizontally on a list item,ViewPager.onInterceptTouchEvent()intercepts the horizontal touch and switches tabs instead of swiping the list item.2. Proposed Modes to Resolve
Mode 0: Off (No Gesture)
Mode 1: Swipe for switching between tabs (Default)
Mode 2: Swipe for executing Action
view_pager.isPagingEnabled = false.TabLayout.Mode 3: Screen Area Distribution for Swipe
The screen width is partitioned into distinct horizontal interaction zones:
When gesture starts in the center of the screen: The touch is delegated to
MyViewPagerto allow horizontal tab switching.When gesture starts in the edges: Touch interception by
ViewPagerand executes the swipe action (configurable) on item.OR BOTH 2 & 3 given as option
3.
commons& AppsImplementation strictly separates the gesture mechanism from the app policies:
A. In
org.fossify:commonsSwipeActionHelper:BaseConfigPreferences:swipeGestureMode(options: Off, Mode 1: Swipe for switching between tabs, Mode 2: Swipe for executing Action, Mode 3: Screen Area Distribution for Swipe),swipeLeftAction, andswipeRightActionconfigurationB. In Individual Apps (The Policies)
Messages:SwipeActionHelpertoConversationsAdapterSnackbarcontaining anUNDOaction.Phone:SwipeActionHelpertoRecentCallsAdapterand Contacts tab list.Contacts:SwipeActionHelpertoContactsAdapterfor quick Call/SMS/Other actions.Other Apps (
Gallery,Notes,File Manager):swipeGestureModepreference; defaults to Mode 1 (tab switching) or disabled depending on app layout.Hey, @naveensingh , @Aga-C
Which of the modes best fits for Fossify?
Any suggestions for this proposal?
Once there is consensus on the preferred mode, I would love to` to submit the PRs following all contribution under guidelines.
All reactions