Fix: Prevent gesture navigation from overriding Previewer Slider #20400
Open
adi09871 wants to merge 1 commit intoankidroid:mainfrom
Open
Fix: Prevent gesture navigation from overriding Previewer Slider #20400adi09871 wants to merge 1 commit intoankidroid:mainfrom
adi09871 wants to merge 1 commit intoankidroid:mainfrom
Conversation
Author
Screen.Recording.2026-03-05.234059.mp4Here is the video demonstrating the fix |
Contributor
|
I don't think your video and the issue raised match up. I don't see the slider in the video and the issue targets the fact that users that use the slider may have conflicts with gesture controls. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose / Description
When the slider in the Previewer is in active use, gesture navigation from the edges (swipe to go back) overrides the slider control. This makes it difficult to begin using the slider from the extreme left or right ends, as the system intercepts the touch event.
Fixes
Approach
I added
requestDisallowInterceptTouchEvent(true)to the slider's parent view insideonStartTrackingTouch. This prevents the system's edge-to-edge gesture navigation from hijacking the active swipe gesture when the user is interacting with the slider. Once the user releases the slider (onStopTrackingTouch), it is set back tofalseto restore normal system back-navigation.How Has This Been Tested?
Tested locally on an Android Emulator (API 34) with Gesture Navigation enabled.
(A screen recording demonstrating this fix is attached in the comments below.)
Checklist
Please, go through these checks before submitting the PR.