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

The following examples show how to use com.facebook.react.common.MapBuilder#Builder . 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: RNAdMobBannerViewManager.java    From react-native-admob with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Override
@Nullable
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    String[] events = {
        EVENT_SIZE_CHANGE,
        EVENT_AD_LOADED,
        EVENT_AD_FAILED_TO_LOAD,
        EVENT_AD_OPENED,
        EVENT_AD_CLOSED,
        EVENT_AD_LEFT_APPLICATION
    };
    for (int i = 0; i < events.length; i++) {
        builder.put(events[i], MapBuilder.of("registrationName", events[i]));
    }
    return builder.build();
}
 
Example 2
Source File: RNPublisherBannerViewManager.java    From react-native-admob with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Override
@Nullable
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    String[] events = {
        EVENT_SIZE_CHANGE,
        EVENT_AD_LOADED,
        EVENT_AD_FAILED_TO_LOAD,
        EVENT_AD_OPENED,
        EVENT_AD_CLOSED,
        EVENT_AD_LEFT_APPLICATION,
        EVENT_APP_EVENT
    };
    for (int i = 0; i < events.length; i++) {
        builder.put(events[i], MapBuilder.of("registrationName", events[i]));
    }
    return builder.build();
}
 
Example 3
Source File: RNYandexMapKitManager.java    From react-native-yandexmapkit with MIT License 5 votes vote down vote up
@Nullable
@Override
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    builder.put(RNYandexMapKitView.MAP_EVENT,       MapBuilder.of("registrationName", RNYandexMapKitView.MAP_EVENT));
    builder.put(RNYandexMapKitView.GEOCODING_EVENT, MapBuilder.of("registrationName", RNYandexMapKitView.GEOCODING_EVENT));
    return builder.build();
}
 
Example 4
Source File: ReactVideoViewManager.java    From react-native-video with MIT License 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 5
Source File: ReactExoplayerViewManager.java    From react-native-video with MIT License 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 6
Source File: ReactNativeIntl.java    From react-native-intl with MIT License 5 votes vote down vote up
@Override
public Map<String, Object> getConstants() {
	MapBuilder.Builder<String, Object> builder = MapBuilder.builder();

	builder.put("systemLocale", getSystemLocale());
	builder.put("languages", getAvailableLocales());
	builder.put("availableLocales", getAvailableLocales());
	builder.put("availableCalendars", "");

	return builder.build();
}
 
Example 7
Source File: PiliAudioStreamingViewManager.java    From react-native-pili with MIT License 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 8
Source File: PiliStreamingViewManager.java    From react-native-pili with MIT License 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 9
Source File: PiliPlayerViewManager.java    From react-native-pili with MIT License 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 10
Source File: RNRtmpViewManager.java    From react-native-rtmpview with MIT License 5 votes vote down vote up
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (RNRtmpView.Events event : RNRtmpView.Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 11
Source File: TapjoyModule.java    From react-native-tapjoy with MIT License 5 votes vote down vote up
@Nullable
@Override
public Map<String, Object> getConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    List<String> events = new ArrayList<>();

    for (Object event : Events.values()) {
        events.add(event.toString());
    }

    builder.put("events", events);
    return builder.build();
}
 
Example 12
Source File: VLCPlayerViewManager.java    From react-native-vlc-player with MIT License 5 votes vote down vote up
@Nullable
@Override
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (VLCPlayerView.Events event : VLCPlayerView.Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 13
Source File: PiliAudioStreamingViewManager.java    From pili-react-native with MIT License 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 14
Source File: PiliStreamingViewManager.java    From pili-react-native with MIT License 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
Source File: PiliPlayerViewManager.java    From pili-react-native with MIT License 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 16
Source File: RN3DViewManager.java    From react-native-3d-model-view with MIT License 5 votes vote down vote up
@Override
@Nullable
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
  MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
  return builder
          .put("onLoadModelSuccess", MapBuilder.of("registrationName", "onLoadModelSuccess"))
          .put("onLoadModelError", MapBuilder.of("registrationName", "onLoadModelError"))
          .put("onAnimationStart", MapBuilder.of("registrationName", "onAnimationStart"))
          .put("onAnimationStop", MapBuilder.of("registrationName", "onAnimationStop"))
          .put("onAnimationUpdate", MapBuilder.of("registrationName", "onAnimationUpdate"))
          .build();
}
 
Example 17
Source File: SmartRefreshLayoutManager.java    From react-native-SmartRefreshLayout with Apache License 2.0 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 18
Source File: RNRtmpViewManager.java    From react-native-rtmpview with MIT License 5 votes vote down vote up
@Override
public Map<String,Integer> getCommandsMap() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (RNRtmpView.Commands command : RNRtmpView.Commands.values()) {
        builder.put(command.toString(), command.ordinal());
    }
    return builder.build();
}