Android parent onTouchEvent kidnaps onTouchEvent child

I have an Android application screen in which I have a form where a user can take an image and fill in pic details. I also want the user to write something above the image (it's like a finger drawing), but the problem is that too many fields made the view scrollable, and therefore the user cannot draw the image. Can I somehow disable parental scrolling when I touch my image?

+4
source share
1 answer

Have you tried with:

mYourImageView.requestDisallowInterceptTouchEvent(true); 

Called when the child does not want this parent and his ancestors to intercept touch events using onInterceptTouchEvent (MotionEvent).

+1
source

Source: https://habr.com/ru/post/1497425/


All Articles