-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(android): add getScaledTouchSlop() to ListView #11680
Conversation
Tests:
|
@m1ga, I don't know if I like the idea of this. This effectively dampens all "scroll" events where it'll only fire if it has moved 5 pixels away from its last position. I'm curious what your use-case is. |
@jquick-axway check the JIRA description. The current implementation will fire up/down changes for every pixel and it will create some noise if you stop moving your finger but the the phone will recognize tiny changes and e.g. it will already show/hide your views because it thinks you've change direction. Just putting the finger on the screen will most of the time already fire a up/down event. |
@m1ga, oh I see. Sorry about misunderstanding this. What you're doing makes sense. My only feedback then is:
FYI: We use the touch-slop API to handle nested scrolling for Titanium's What do you think? |
@jquick-axway didn't know about that method! Nice, updated the PR, remove the custom value. Works fine here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: Pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed Tested using the test case mentioned above, able to see scrolling direction being more stable and not changing constantly (perviously just placing your finger on the screen was enough to trigger the scroll event)
Test Environment
MacOS Big Sur: 11.0 Beta
Xcode: 12.0 Beta
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.0.0""
API29 Pixel XL emulator
Fix verified on build 9.1.0.v20200804082025. Test environment
|
JIRA:
https://jira.appcelerator.org/browse/TIMOB-27879
Optional Description:
Prevents the
scrolling
direction change to quickly. The current implementation will trigger an up/down change when you stop scrolling and your finger moves one pixel.