I have a view on the screen that contains several view that in turn overlap each other.
I need to work only with the first one at the moment, for this I override the onInterceptTouchEvent() function, in every view inside the main view і in the main view redefine dispatchTouchEvent , where, according to the incoming event, I control the behavior of the current view .
Also, in order not to interfere with the view.setOnTouchListener((v, event) -> true); that are not used at the current time, I make them unTouch using view.setOnTouchListener((v, event) -> true);
But there is a problem. Sometimes another view , which is currently still unTouchable , intercepts events in oiInterceptTouchEvent() , but OnTouch not enter OnTouch .
Tell me what could be the problem. Can anyone come across?
Also during debugging, I saw that during the MotionEvent.ACTION_DOWN event in the dispatchTouchEvent(MotionEvent event) in the main view goes into the dispatchHoverEvent(MotionEvent event) and after that the second view intercepts the event, but it should not be so.