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

fix(android): support scroll view under a context menu in android #116

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

yunchaehyun
Copy link
Contributor

Hello there. First, I would like to thank you for developing such a great library. I've added some code to fix an issue where the scroll does not work when a ScrollView is placed under a Context Menu in Android.

The onInterceptTouchEvent method is a method in Android's ViewGroup that intercepts touch events before they are passed to child views. There was a function in the package that overrides this method and returned true, which prevented the scroll view in the child component from working. I have made modifications as follows to solve this problem.

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        gestureDetector.onTouchEvent(ev);
        return super.onInterceptTouchEvent(ev);
    }

I kindly ask for a positive review of these changes.

@mpiannucci
Copy link
Owner

Thank you so much!

@mpiannucci mpiannucci merged commit b67065a into mpiannucci:main Apr 28, 2024
@yunchaehyun
Copy link
Contributor Author

Thank you for approving. Could you please distribute an updated version with the code changes via npm? I'd like to install and use it, but the current version doesn't reflect the code updates.

@mpiannucci
Copy link
Owner

Done now :)

@aBabken
Copy link

aBabken commented Jun 15, 2024

but it still does not work on android, sometimes I see the same problem while scrolling

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.

None yet

3 participants