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

feat: added sensitivity controller to android #802

Closed
wants to merge 1 commit into from

Conversation

adamsythe
Copy link

Summary

This pull request allows users to toggle the sensitivity on android. It is particularly useful for pagerview's that contain scrollable webviews.

Test Plan

Make sure the prop filters through the JS to reduceDragSensitivity kotlin function and is set correctly. Make sure the app visibly scrolls with less sensitivity as the number increasers.

What's required for testing (prerequisites)?

Just be able to run the app in android studio

What are the steps to reproduce (after prerequisites)?

Go to BasicPagerViewExample and add the prop
ScrollSensitivity={8}
in Android studio put a stop on
android/src/main/java/com/reactnativepagerview/PagerViewViewManagerImpl.kt on line 25.

Run the basic example and when the stop fires check that the prop is correctly set at 8.

You can also toggle the number and notice the reduced sensitivity on higher numbers.

Compatibility

OS Implemented
iOS ✅❌
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)

@troZee
Copy link
Member

troZee commented Mar 21, 2024

Hello 👋
Thank you for your 1st contribution ❤️ Could you tell, if your problem is described in this article https://bladecoder.medium.com/fixing-recyclerview-nested-scrolling-in-opposite-direction-f587be5c1a04 ?

@MrRefactor
Copy link
Collaborator

Hey, as this PR is adding sensitivity controller to android only, Im closing it as we want to have feature parity on both iOS and android. Thanks for the effort!

@MrRefactor MrRefactor closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants