Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce ViewPager2 sensitivity #314

Merged
merged 1 commit into from
Sep 14, 2021
Merged

Conversation

OxygenCobalt
Copy link
Contributor

I found that by default, ViewPager2 is far too sensitive for MPGO's scrolling views and fast scrollers, causing many non-swipe touch events to result in a swipe.

This PR fixes that by doing some reflection magic and changing the internal mTouchSlop value to favor scrolling during touch events instead of swiping. This should help improve UX somewhat.

Feel free to raise any concerns with my change.

By default, ViewPager2's sensitivity is high enough to result in
vertical scroll events being registered as horizontal scroll events.
Reflect into the internal recyclerview and change the touch slope so
that touch actions will act more as a scroll than as a swipe.
@enricocid
Copy link
Owner

Works great. Thank You :)

@enricocid enricocid merged commit 7b2e9d9 into enricocid:main Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants