Java Code Examples for com.facebook.react.common.MapBuilder

The following are top voted examples for showing how to use com.facebook.react.common.MapBuilder. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: react-native-fast-image   File: FastImageViewManager.java   View source code 6 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.of(
            REACT_ON_LOAD_START_EVENT,
            MapBuilder.of("registrationName", REACT_ON_LOAD_START_EVENT),
            REACT_ON_PROGRESS_EVENT,
            MapBuilder.of("registrationName", REACT_ON_PROGRESS_EVENT),
            REACT_ON_LOAD_EVENT,
            MapBuilder.of("registrationName", REACT_ON_LOAD_EVENT),
            REACT_ON_ERROR_EVENT,
            MapBuilder.of("registrationName", REACT_ON_ERROR_EVENT),
            REACT_ON_LOAD_END_EVENT,
            MapBuilder.of("registrationName", REACT_ON_LOAD_END_EVENT)
    );
}
 
Example 2
Project: RNLearn_Project1   File: ReactQueueConfigurationImpl.java   View source code 6 votes vote down vote up
public static ReactQueueConfigurationImpl create(
    ReactQueueConfigurationSpec spec,
    QueueThreadExceptionHandler exceptionHandler) {
  Map<MessageQueueThreadSpec, MessageQueueThreadImpl> specsToThreads = MapBuilder.newHashMap();

  MessageQueueThreadSpec uiThreadSpec = MessageQueueThreadSpec.mainThreadSpec();
  MessageQueueThreadImpl uiThread =
    MessageQueueThreadImpl.create( uiThreadSpec, exceptionHandler);
  specsToThreads.put(uiThreadSpec, uiThread);

  MessageQueueThreadImpl jsThread = specsToThreads.get(spec.getJSQueueThreadSpec());
  if (jsThread == null) {
    jsThread = MessageQueueThreadImpl.create(spec.getJSQueueThreadSpec(), exceptionHandler);
  }

  MessageQueueThreadImpl nativeModulesThread =
      specsToThreads.get(spec.getNativeModulesQueueThreadSpec());
  if (nativeModulesThread == null) {
    nativeModulesThread =
        MessageQueueThreadImpl.create(spec.getNativeModulesQueueThreadSpec(), exceptionHandler);
  }

  return new ReactQueueConfigurationImpl(uiThread, nativeModulesThread, jsThread);
}
 
Example 3
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testCustomBubblingEvents() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getExportedCustomBubblingEventTypeConstants())
      .thenReturn(MapBuilder.of("onTwirl", TWIRL_BUBBLING_EVENT_MAP));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat((Map) constants.get(CUSTOM_BUBBLING_EVENT_TYPES))
      .contains(MapEntry.entry("onTwirl", TWIRL_BUBBLING_EVENT_MAP))
      .containsKey("topChange");
}
 
Example 4
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testCustomDirectEvents() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getExportedCustomDirectEventTypeConstants())
      .thenReturn(MapBuilder.of("onTwirl", TWIRL_DIRECT_EVENT_MAP));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat((Map) constants.get(CUSTOM_DIRECT_EVENT_TYPES))
      .contains(MapEntry.entry("onTwirl", TWIRL_DIRECT_EVENT_MAP))
      .containsKey("topLoadingStart");
}
 
Example 5
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testCustomViewConstants() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getName()).thenReturn("RedPandaPhotoOfTheDayView");
  when(mockViewManager.getExportedViewConstants())
      .thenReturn(MapBuilder.of("PhotoSizeType", MapBuilder.of("Small", 1, "Large", 2)));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat(constants).containsKey("RedPandaPhotoOfTheDayView");
  assertThat((Map) constants.get("RedPandaPhotoOfTheDayView")).containsKey("Constants");
  assertThat((Map) valueAtPath(constants, "RedPandaPhotoOfTheDayView", "Constants"))
      .containsKey("PhotoSizeType");
}
 
Example 6
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testNativeProps() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getName()).thenReturn("SomeView");
  when(mockViewManager.getNativeProps())
      .thenReturn(MapBuilder.of("fooProp", "number"));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat((String) valueAtPath(constants, "SomeView", "NativeProps", "fooProp"))
      .isEqualTo("number");
}
 
Example 7
Project: RNLearn_Project1   File: ReactQueueConfigurationImpl.java   View source code 6 votes vote down vote up
public static ReactQueueConfigurationImpl create(
    ReactQueueConfigurationSpec spec,
    QueueThreadExceptionHandler exceptionHandler) {
  Map<MessageQueueThreadSpec, MessageQueueThreadImpl> specsToThreads = MapBuilder.newHashMap();

  MessageQueueThreadSpec uiThreadSpec = MessageQueueThreadSpec.mainThreadSpec();
  MessageQueueThreadImpl uiThread =
    MessageQueueThreadImpl.create( uiThreadSpec, exceptionHandler);
  specsToThreads.put(uiThreadSpec, uiThread);

  MessageQueueThreadImpl jsThread = specsToThreads.get(spec.getJSQueueThreadSpec());
  if (jsThread == null) {
    jsThread = MessageQueueThreadImpl.create(spec.getJSQueueThreadSpec(), exceptionHandler);
  }

  MessageQueueThreadImpl nativeModulesThread =
      specsToThreads.get(spec.getNativeModulesQueueThreadSpec());
  if (nativeModulesThread == null) {
    nativeModulesThread =
        MessageQueueThreadImpl.create(spec.getNativeModulesQueueThreadSpec(), exceptionHandler);
  }

  return new ReactQueueConfigurationImpl(uiThread, nativeModulesThread, jsThread);
}
 
Example 8
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testCustomBubblingEvents() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getExportedCustomBubblingEventTypeConstants())
      .thenReturn(MapBuilder.of("onTwirl", TWIRL_BUBBLING_EVENT_MAP));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat((Map) constants.get(CUSTOM_BUBBLING_EVENT_TYPES))
      .contains(MapEntry.entry("onTwirl", TWIRL_BUBBLING_EVENT_MAP))
      .containsKey("topChange");
}
 
Example 9
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testCustomDirectEvents() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getExportedCustomDirectEventTypeConstants())
      .thenReturn(MapBuilder.of("onTwirl", TWIRL_DIRECT_EVENT_MAP));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat((Map) constants.get(CUSTOM_DIRECT_EVENT_TYPES))
      .contains(MapEntry.entry("onTwirl", TWIRL_DIRECT_EVENT_MAP))
      .containsKey("topLoadingStart");
}
 
Example 10
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testCustomViewConstants() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getName()).thenReturn("RedPandaPhotoOfTheDayView");
  when(mockViewManager.getExportedViewConstants())
      .thenReturn(MapBuilder.of("PhotoSizeType", MapBuilder.of("Small", 1, "Large", 2)));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat(constants).containsKey("RedPandaPhotoOfTheDayView");
  assertThat((Map) constants.get("RedPandaPhotoOfTheDayView")).containsKey("Constants");
  assertThat((Map) valueAtPath(constants, "RedPandaPhotoOfTheDayView", "Constants"))
      .containsKey("PhotoSizeType");
}
 
Example 11
Project: RNLearn_Project1   File: UIManagerModuleConstantsTest.java   View source code 6 votes vote down vote up
@Test
public void testNativeProps() {
  ViewManager mockViewManager = mock(ViewManager.class);
  List<ViewManager> viewManagers = Arrays.asList(mockViewManager);
  when(mockViewManager.getName()).thenReturn("SomeView");
  when(mockViewManager.getNativeProps())
      .thenReturn(MapBuilder.of("fooProp", "number"));
  UIManagerModule uiManagerModule = new UIManagerModule(
    mReactContext,
    viewManagers,
    mUIImplementationProvider,
    false);
  Map<String, Object> constants = uiManagerModule.getConstants();
  assertThat((String) valueAtPath(constants, "SomeView", "NativeProps", "fooProp"))
      .isEqualTo("number");
}
 
Example 12
Project: react-native-videoplayer   File: ReactExoplayerViewManager.java   View source code 5 votes vote down vote up
@Override
public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    for (String event : VideoEventEmitter.Events) {
        builder.put(event, MapBuilder.of("registrationName", event));
    }
    return builder.build();
}
 
Example 13
Project: react-native-videoplayer   File: ReactExoplayerViewManager.java   View source code 5 votes vote down vote up
@Override
public @Nullable Map<String, Object> getExportedViewConstants() {
    return MapBuilder.<String, Object>of(
            "ScaleNone", Integer.toString(ResizeMode.RESIZE_MODE_FIT),
            "ScaleAspectFit", Integer.toString(ResizeMode.RESIZE_MODE_FIT),
            "ScaleToFill", Integer.toString(ResizeMode.RESIZE_MODE_FILL),
            "ScaleAspectFill", Integer.toString(ResizeMode.RESIZE_MODE_CENTER_CROP)
    );
}
 
Example 14
Project: react-native-videoplayer   File: ReactVideoViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 15
Project: react-native-videoplayer   File: ReactVideoViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedViewConstants() {
    return MapBuilder.of(
            "ScaleNone", Integer.toString(ScalableType.LEFT_TOP.ordinal()),
            "ScaleToFill", Integer.toString(ScalableType.FIT_XY.ordinal()),
            "ScaleAspectFit", Integer.toString(ScalableType.FIT_CENTER.ordinal()),
            "ScaleAspectFill", Integer.toString(ScalableType.CENTER_CROP.ordinal())
    );
}
 
Example 16
Project: react-native-extendable-image   File: ExtendableImageManager.java   View source code 5 votes vote down vote up
@Nullable
@Override
public Map getExportedCustomBubblingEventTypeConstants() {
  MapBuilder.Builder<String, Map> builder = MapBuilder.builder();
  for (SendEventTypes evt : SendEventTypes.values()) {
    builder.put(evt.toString(), MapBuilder.of("registrationName", evt.toString()));
  }
  Log.d(TAG, builder.toString());
  return builder.build();
}
 
Example 17
Project: react-native-extendable-image   File: ExtendableImageManager.java   View source code 5 votes vote down vote up
@Nullable
@Override
public Map<String, Integer> getCommandsMap() {
  return MapBuilder.of(
          ReceiveEventTypes.ANIMATE,
          ReceiveEventTypes.ANIMATE_CODE
  );
}
 
Example 18
Project: react-native-extendable-image   File: ExtendableImageManager.java   View source code 5 votes vote down vote up
@Nullable
@Override
public Map getExportedViewConstants() {
  return MapBuilder.of(
          "PanCenter", Integer.toString(ExtendableImage.PAN_LIMIT_CENTER),
          "PanInside", Integer.toString(ExtendableImage.PAN_LIMIT_INSIDE),
          "PanOutside", Integer.toString(ExtendableImage.PAN_LIMIT_OUTSIDE),
          "ScaleCenterCrop", Integer.toString(ExtendableImage.SCALE_TYPE_CENTER_CROP),
          "ScaleCenterInside", Integer.toString(ExtendableImage.SCALE_TYPE_CENTER_INSIDE),
          "ScaleCustom", Integer.toString(ExtendableImage.SCALE_TYPE_CUSTOM)
  );
}
 
Example 19
Project: react-native-twitterkit   File: ReactTweetViewManager.java   View source code 5 votes vote down vote up
public @Nullable
Map getExportedCustomDirectEventTypeConstants() {
  return MapBuilder.of(
          "onLoadError", MapBuilder.of("registrationName", "onLoadError"),
          "onLoadSuccess", MapBuilder.of("registrationName", "onLoadSuccess")
  );
}
 
Example 20
Project: react-native-collapsing-toolbar   File: AppBarLayoutManager.java   View source code 5 votes vote down vote up
@Nullable
@Override
public Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
    return MapBuilder.<String, Object>builder()
        .put("topOffsetChanged",
            MapBuilder.of(
                "phasedRegistrationNames",
                MapBuilder.of(
                    "bubbled", "onOffsetChanged", "captured", "onOffsetChangedCapture")))
        .build();
}
 
Example 21
Project: react-native-android-piliplayer   File: PLVideoTextureViewManager.java   View source code 5 votes vote down vote up
@Override
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 22
Project: react-native-android-circular-reveal   File: CircularRevealViewManager.java   View source code 5 votes vote down vote up
@Override
public Map<String,Integer> getCommandsMap() {
  return MapBuilder.of(
          "REVEAL",
          COMMAND_REVEAL,
          "HIDE",
          COMMAND_HIDE);
}
 
Example 23
Project: react-native-sketch-view   File: RNSketchViewManager.java   View source code 5 votes vote down vote up
@Nullable
@Override
public Map<String, Integer> getCommandsMap() {
  return MapBuilder.of(
          "clearSketch",
          COMMAND_CLEAR_SKETCH,
          "saveSketch",
          COMMAND_SAVE_SKETCH,
          "changeTool",
          COMMAND_CHANGE_TOOL);
}
 
Example 24
Project: react-native-recyclerview-list   File: RecyclerViewBackedScrollViewManager.java   View source code 5 votes vote down vote up
@Override
public Map<String, Integer> getCommandsMap() {
    return MapBuilder.of(
        "notifyItemRangeInserted", COMMAND_NOTIFY_ITEM_RANGE_INSERTED,
        "notifyItemRangeRemoved", COMMAND_NOTIFY_ITEM_RANGE_REMOVED,
        "notifyDataSetChanged", COMMAND_NOTIFY_DATASET_CHANGED,
        "scrollToIndex", COMMAND_SCROLL_TO_INDEX
    );
}
 
Example 25
Project: react-native-recyclerview-list   File: RecyclerViewBackedScrollViewManager.java   View source code 5 votes vote down vote up
@Override
public
@Nullable
Map getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.builder()
            .put(ScrollEventType.SCROLL.getJSEventName(), MapBuilder.of("registrationName", "onScroll"))
            .put(ContentSizeChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", "onContentSizeChange"))
            .put(VisibleItemsChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", "onVisibleItemsChange"))
            .build();
}
 
Example 26
Project: react-native-pili-player   File: PiliLiveViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 27
Project: react-native-pili-player   File: PiliPlayerViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 28
Project: pili-react-native   File: PiliPlayerViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 29
Project: pili-react-native   File: PiliStreamingViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 30
Project: pili-react-native   File: PiliAudioStreamingViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 31
Project: react-native-pull-up-down-refresh   File: RCTSwipeRefreshLayoutManager.java   View source code 5 votes vote down vote up
@Override
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.<String, Object>builder()
            .put("RCTSwipeRefreshLayout.TouchMove", MapBuilder.of("registrationName", "onSwipe"))
            .put("RCTSwipeRefreshLayout.TouchUp", MapBuilder.of("registrationName", "onSwipeRefresh"))
            .build();
}
 
Example 32
Project: react-native-android-new-crosswalk   File: CrosswalkWebViewGroupManager.java   View source code 5 votes vote down vote up
@Override
public
@Nullable
Map<String, Integer> getCommandsMap () {
    return MapBuilder.of(
        "goBack", GO_BACK,
        "goForward", GO_FORWARD,
        "reload", RELOAD,
        "postMessage", POST_MESSAGE
    );
}
 
Example 33
Project: react-native-android-new-crosswalk   File: CrosswalkWebViewGroupManager.java   View source code 5 votes vote down vote up
@Override
public Map getExportedCustomDirectEventTypeConstants () {
    return MapBuilder.of(
        NavigationStateChangeEvent.EVENT_NAME,
        MapBuilder.of("registrationName", "onCrosswalkWebViewNavigationStateChange"),
        ErrorEvent.EVENT_NAME,
        MapBuilder.of("registrationName", "onCrosswalkWebViewError"),
        ProgressEvent.EVENT_NAME,
        MapBuilder.of("registrationName", "onCrosswalkWebViewProgress"),
        TopMessageEvent.EVENT_NAME,
        MapBuilder.of("registrationName", "onMessage")
    );
}
 
Example 34
Project: react-native-pili-live   File: PiliPlayerViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 35
Project: react-native-pili-live   File: PiliStreamingViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 36
Project: react-native-pili-live   File: PiliAudioStreamingViewManager.java   View source code 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 37
Project: RNLearn_Project1   File: ReactTextInputManager.java   View source code 5 votes vote down vote up
@Nullable
@Override
public Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
  return MapBuilder.<String, Object>builder()
      .put(
          "topSubmitEditing",
          MapBuilder.of(
              "phasedRegistrationNames",
              MapBuilder.of(
                  "bubbled", "onSubmitEditing", "captured", "onSubmitEditingCapture")))
      .put(
          "topEndEditing",
          MapBuilder.of(
              "phasedRegistrationNames",
              MapBuilder.of("bubbled", "onEndEditing", "captured", "onEndEditingCapture")))
      .put(
          "topTextInput",
          MapBuilder.of(
              "phasedRegistrationNames",
              MapBuilder.of("bubbled", "onTextInput", "captured", "onTextInputCapture")))
      .put(
          "topFocus",
          MapBuilder.of(
              "phasedRegistrationNames",
              MapBuilder.of("bubbled", "onFocus", "captured", "onFocusCapture")))
      .put(
          "topBlur",
          MapBuilder.of(
              "phasedRegistrationNames",
              MapBuilder.of("bubbled", "onBlur", "captured", "onBlurCapture")))
      .build();
}
 
Example 38
Project: RNLearn_Project1   File: ReactTextInputManager.java   View source code 5 votes vote down vote up
@Override
public @Nullable Map getExportedViewConstants() {
  return MapBuilder.of(
      "AutoCapitalizationType",
      MapBuilder.of(
          "none",
          0,
          "characters",
          InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS,
          "words",
          InputType.TYPE_TEXT_FLAG_CAP_WORDS,
          "sentences",
          InputType.TYPE_TEXT_FLAG_CAP_SENTENCES));
}
 
Example 39
Project: RNLearn_Project1   File: ReactDrawerLayoutManager.java   View source code 5 votes vote down vote up
@Override
public @Nullable Map getExportedCustomDirectEventTypeConstants() {
  return MapBuilder.of(
      DrawerSlideEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerSlide"),
      DrawerOpenedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerOpen"),
      DrawerClosedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerClose"),
      DrawerStateChangedEvent.EVENT_NAME, MapBuilder.of(
          "registrationName", "onDrawerStateChanged"));
}
 
Example 40
Project: RNLearn_Project1   File: SwipeRefreshLayoutManager.java   View source code 5 votes vote down vote up
@Nullable
@Override
public Map<String, Object> getExportedViewConstants() {
  return MapBuilder.<String, Object>of(
      "SIZE",
      MapBuilder.of("DEFAULT", SwipeRefreshLayout.DEFAULT, "LARGE", SwipeRefreshLayout.LARGE));
}