public class JSResponderHandler extends java.lang.Object implements OnInterceptTouchEventListener
UIManagerModule
. It should be set as
OnInterceptTouchEventListener for all newly created native views that implements
ReactInterceptingViewGroup
and thanks to the information whether JSResponder is set
and to which view it will correctly coordinate the return values of
OnInterceptTouchEventListener
such that touch events will be dispatched to the view
selected by JS gesture recognizer.
Single CatalystInstance
should reuse same instance of this class.Constructor and Description |
---|
JSResponderHandler() |
Modifier and Type | Method and Description |
---|---|
void |
clearJSResponder() |
boolean |
onInterceptTouchEvent(android.view.ViewGroup v,
android.view.MotionEvent event)
Called when a onInterceptTouch is invoked on a view group
|
void |
setJSResponder(int tag,
android.view.ViewParent viewParentBlockingNativeResponder) |
public void setJSResponder(int tag, @Nullable android.view.ViewParent viewParentBlockingNativeResponder)
public void clearJSResponder()
public boolean onInterceptTouchEvent(android.view.ViewGroup v, android.view.MotionEvent event)
OnInterceptTouchEventListener
onInterceptTouchEvent
in interface OnInterceptTouchEventListener
v
- The view group the onInterceptTouch has been called onevent
- The motion event being dispatched down the hierarchy.