com.facebook.react.uimanager.JSTouchDispatcher Java Examples

The following examples show how to use com.facebook.react.uimanager.JSTouchDispatcher. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactRootView.java    From react-native-GPay with MIT License 5 votes vote down vote up
public void onAttachedToReactInstance() {
  // Create the touch dispatcher here instead of having it always available, to make sure
  // that all touch events are only passed to JS after React/JS side is ready to consume
  // them. Otherwise, these events might break the states expected by JS.
  // Note that this callback was invoked from within the UI thread.
  mJSTouchDispatcher = new JSTouchDispatcher(this);
  if (mRootViewEventListener != null) {
    mRootViewEventListener.onAttachedToReactInstance(this);
  }
}
 
Example #2
Source File: ReactView.java    From react-native-navigation with MIT License 5 votes vote down vote up
public ReactView(final Context context, ReactInstanceManager reactInstanceManager, String componentId, String componentName) {
	super(context);
	this.reactInstanceManager = reactInstanceManager;
	this.componentId = componentId;
	this.componentName = componentName;
	jsTouchDispatcher = new JSTouchDispatcher(this);
}
 
Example #3
Source File: ReactRootView.java    From react-native-GPay with MIT License 4 votes vote down vote up
/**
 * Is used by unit test to setup mIsAttachedToWindow flags, that will let this
 * view to be properly attached to catalyst instance by startReactApplication call
 */
@VisibleForTesting
/* package */ void simulateAttachForTesting() {
  mIsAttachedToInstance = true;
  mJSTouchDispatcher = new JSTouchDispatcher(this);
}