ColorPickerView icon indicating copy to clipboard operation
ColorPickerView copied to clipboard

Incorrect touch event in NestScrollView

Open DanteAndroid opened this issue 3 years ago • 2 comments

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.

DanteAndroid avatar Mar 20 '22 01:03 DanteAndroid

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
}

marwia avatar Nov 29 '23 10:11 marwia

Yes It resolved my issue @marwia

alizahid1996 avatar Dec 01 '23 06:12 alizahid1996