Java 类com.facebook.react.views.toolbar.events.ToolbarClickEvent 实例源码

项目:RNLearn_Project1    文件:ReactToolbarManager.java   
@Override
protected void addEventEmitters(final ThemedReactContext reactContext, final ReactToolbar view) {
  final EventDispatcher mEventDispatcher = reactContext.getNativeModule(UIManagerModule.class)
      .getEventDispatcher();
  view.setNavigationOnClickListener(
      new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(view.getId(), -1));
        }
      });

  view.setOnMenuItemClickListener(
      new ReactToolbar.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem menuItem) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(
                  view.getId(),
                  menuItem.getOrder()));
          return true;
        }
      });
}
项目:RNLearn_Project1    文件:ReactToolbarManager.java   
@Override
protected void addEventEmitters(final ThemedReactContext reactContext, final ReactToolbar view) {
  final EventDispatcher mEventDispatcher = reactContext.getNativeModule(UIManagerModule.class)
      .getEventDispatcher();
  view.setNavigationOnClickListener(
      new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(view.getId(), -1));
        }
      });

  view.setOnMenuItemClickListener(
      new ReactToolbar.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem menuItem) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(
                  view.getId(),
                  menuItem.getOrder()));
          return true;
        }
      });
}
项目:ReactNativeSignatureExample    文件:ReactToolbarManager.java   
@Override
protected void addEventEmitters(final ThemedReactContext reactContext, final ReactToolbar view) {
  final EventDispatcher mEventDispatcher = reactContext.getNativeModule(UIManagerModule.class)
      .getEventDispatcher();
  view.setNavigationOnClickListener(
      new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(view.getId(), SystemClock.nanoTime(), -1));
        }
      });

  view.setOnMenuItemClickListener(
      new ReactToolbar.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem menuItem) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(
                  view.getId(),
                  SystemClock.nanoTime(),
                  menuItem.getOrder()));
          return true;
        }
      });
}
项目:react-native-ibeacon-android    文件:ReactToolbarManager.java   
@Override
protected void addEventEmitters(final ThemedReactContext reactContext, final ReactToolbar view) {
  final EventDispatcher mEventDispatcher = reactContext.getNativeModule(UIManagerModule.class)
      .getEventDispatcher();
  view.setNavigationOnClickListener(
      new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(view.getId(), SystemClock.nanoTime(), -1));
        }
      });

  view.setOnMenuItemClickListener(
      new ReactToolbar.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem menuItem) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(
                  view.getId(),
                  SystemClock.nanoTime(),
                  menuItem.getOrder()));
          return true;
        }
      });
}
项目:react-native-box-loaders    文件:ReactToolbarManager.java   
@Override
protected void addEventEmitters(final ThemedReactContext reactContext, final ReactToolbar view) {
  final EventDispatcher mEventDispatcher = reactContext.getNativeModule(UIManagerModule.class)
      .getEventDispatcher();
  view.setNavigationOnClickListener(
      new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(view.getId(), SystemClock.nanoTime(), -1));
        }
      });

  view.setOnMenuItemClickListener(
      new ReactToolbar.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem menuItem) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(
                  view.getId(),
                  SystemClock.nanoTime(),
                  menuItem.getOrder()));
          return true;
        }
      });
}
项目:Ironman    文件:ReactToolbarManager.java   
@Override
protected void addEventEmitters(final ThemedReactContext reactContext, final ReactToolbar view) {
  final EventDispatcher mEventDispatcher = reactContext.getNativeModule(UIManagerModule.class)
      .getEventDispatcher();
  view.setNavigationOnClickListener(
      new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(view.getId(), -1));
        }
      });

  view.setOnMenuItemClickListener(
      new ReactToolbar.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem menuItem) {
          mEventDispatcher.dispatchEvent(
              new ToolbarClickEvent(
                  view.getId(),
                  menuItem.getOrder()));
          return true;
        }
      });
}