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

Intercept MotionEvent when performDismiss() is called #3

Closed
wants to merge 1 commit into from

Conversation

laurencedawson
Copy link

When we have decided to dismiss the view, we should return true in onInterceptTouchEvent() to intercept the MotionEvent and stop the event being passed to the view.

Without this fix when a view is dismissed / hidden quickly it's possible to trigger the onClickListener and click the hidden view.

…InterceptTouchEvent() to intercept the MotionEvent and stop the event being passed to the view. Without this fix when a view is dismissed / hidden quickly it's possible to trigger the onClickListener and click the hidden view.
@romannurik
Copy link
Owner

Thanks! Will review ASAP.

@romannurik
Copy link
Owner

The library does send ACTION_CANCEL to the view when a swipe is observed… are you reproducing this problem when using the library with a custom view? If so, does that custom view handle ACTION_CANCEL?

@romannurik
Copy link
Owner

So I can't reproduce this issue… are there a concrete set of repro steps that would cause this?

@laurencedawson
Copy link
Author

Odd, I extracted the necessary code into a small project and was unable to replicate the issue.

Must of missed something simple but for now I'll close the issue. Sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants