-
public class JSTouchDispatcher
JSTouchDispatcher handles dispatching touches to JS from RootViews. If you implement RootView you need to call handleTouchEvent from onTouchEvent and onInterceptTouchEvent. It will correctly find the right view to handle the touch and also dispatch the appropriate event to JS
-
-
Constructor Summary
Constructors Constructor Description JSTouchDispatcher(ViewGroup viewGroup)
-
Method Summary
Modifier and Type Method Description void
onChildStartedNativeGesture(MotionEvent androidEvent, EventDispatcher eventDispatcher)
void
onChildEndedNativeGesture(MotionEvent androidEvent, EventDispatcher eventDispatcher)
void
handleTouchEvent(MotionEvent ev, EventDispatcher eventDispatcher)
Main catalyst view is responsible for collecting and sending touch events to JS. -
-
Constructor Detail
-
JSTouchDispatcher
JSTouchDispatcher(ViewGroup viewGroup)
-
-
Method Detail
-
onChildStartedNativeGesture
void onChildStartedNativeGesture(MotionEvent androidEvent, EventDispatcher eventDispatcher)
-
onChildEndedNativeGesture
void onChildEndedNativeGesture(MotionEvent androidEvent, EventDispatcher eventDispatcher)
-
handleTouchEvent
void handleTouchEvent(MotionEvent ev, EventDispatcher eventDispatcher)
Main catalyst view is responsible for collecting and sending touch events to JS. This methodreacts for an incoming android native touch events (MotionEvent) and calls into when appropriate. It uses helper method for figuringout a react view ID in the case of ACTION_DOWN event (when the gesture starts).
-
-
-
-