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

Incorrect touch event in NestScrollView #85

Open
DanteAndroid opened this issue Mar 20, 2022 · 2 comments
Open

Incorrect touch event in NestScrollView #85

DanteAndroid opened this issue Mar 20, 2022 · 2 comments

Comments

@DanteAndroid
Copy link

Hi, I have a ColorPickerView and a BrightnessSlideBar inside a NestedScrollView, but when I touch it/them, the event cannot handled properly by them, instead handled by NestedScrollView.
Please tell me how to fix it.

@marwia
Copy link

marwia commented Nov 29, 2023

Hi! I have solved by requesting for disallow intercepting touch events when user touches the ColorPickerView/BrightnessSlideBar. Here is code:

binding.colorPickerView.setOnTouchListener { view, motionEvent ->
            val disallow = motionEvent.actionMasked == MotionEvent.ACTION_DOWN
                    || motionEvent.actionMasked == MotionEvent.ACTION_MOVE
            binding.colorPickerView.requestDisallowInterceptTouchEvent(disallow)
            false
}

@alizahid1996
Copy link

Yes It resolved my issue @marwia

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

No branches or pull requests

3 participants