Example usage for com.facebook.react.common MapBuilder builder

List of usage examples for com.facebook.react.common MapBuilder builder

Introduction

In this page you can find the example usage for com.facebook.react.common MapBuilder builder.

Prototype

public static <K, V> Builder<K, V> builder() 

Source Link

Document

Returns map containing the given entries.

Usage

From source file:com.bottomsheetbehavior.ReactNestedScrollViewManager.java

License:Open Source License

public static Map createExportedCustomDirectEventTypeConstants() {
    return MapBuilder.builder()
            .put(ScrollEventType.SCROLL.getJSEventName(), MapBuilder.of("registrationName", "onScroll"))
            .put(ScrollEventType.BEGIN_DRAG.getJSEventName(),
                    MapBuilder.of("registrationName", "onScrollBeginDrag"))
            .put(ScrollEventType.END_DRAG.getJSEventName(),
                    MapBuilder.of("registrationName", "onScrollEndDrag"))
            .put(ScrollEventType.ANIMATION_END.getJSEventName(),
                    MapBuilder.of("registrationName", "onScrollAnimationEnd"))
            .put(ScrollEventType.MOMENTUM_BEGIN.getJSEventName(),
                    MapBuilder.of("registrationName", "onMomentumScrollBegin"))
            .put(ScrollEventType.MOMENTUM_END.getJSEventName(),
                    MapBuilder.of("registrationName", "onMomentumScrollEnd"))
            .build();/*from  ww  w.ja  v  a2  s.c  o  m*/
}

From source file:com.helloworld.RealRecyclerItemViewManager.java

License:Open Source License

@Override
public @Nullable Map getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.builder().put("onUpdateView", MapBuilder.of("registrationName", "onUpdateView")).build();
}

From source file:com.lightappbuilder.lab4.lablibrary.rnviews.webview.ReactWebViewManager.java

License:Open Source License

@Nullable
@Override//  www  . ja  va  2 s  . co m
public Map getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.builder().put("onLoadRequest", MapBuilder.of("registrationName", "onLoadRequest"))
            .build();
}

From source file:com.reactlibrary.SGScanditPicker.java

License:Apache License

@Nullable
@Override//from   w ww  .  j  a v  a  2  s  .com
public Map getExportedCustomDirectEventTypeConstants() {
    Log.d("React", "COMMANDS DONE2");
    return MapBuilder.builder()
            .put(SETTINGS_DID_CHANGE_EVENT_KEY_NAME,
                    MapBuilder.of("registrationName", SETTINGS_DID_CHANGE_EVENT_NAME))
            .put(DID_SCAN_EVENT_KEY_NAME, MapBuilder.of("registrationName", DID_SCAN_EVENT_NAME)).build();
}

From source file:com.reactnativeandroiddesignsupport.ReactNestedScrollViewManager.java

License:Open Source License

@Override
public @Nullable Map getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.builder().put("topScroll", MapBuilder.of("registrationName", "onScroll"))
            .put("topScrollBeginDrag", MapBuilder.of("registrationName", "onScrollBeginDrag"))
            .put("topScrollEndDrag", MapBuilder.of("registrationName", "onScrollEndDrag"))
            .put("topScrollAnimationEnd", MapBuilder.of("registrationName", "onScrollAnimationEnd"))
            .put("topMomentumScrollBegin", MapBuilder.of("registrationName", "onMomentumScrollBegin"))
            .put("topMomentumScrollEnd", MapBuilder.of("registrationName", "onMomentumScrollEnd")).build();
}

From source file:com.shahenlibrary.VideoPlayer.VideoPlayerViewManager.java

License:Open Source License

@Nullable
@Override/*from   w w w. java2 s . c o m*/
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Map> builder = MapBuilder.builder();
    for (EventsEnum evt : EventsEnum.values()) {
        builder.put(evt.toString(), MapBuilder.of("registrationName", evt.toString()));
    }
    Log.d(VideoPlayerViewManager.REACT_PACKAGE, builder.toString());
    return builder.build();
}

From source file:versioned.host.exp.exponent.modules.api.components.svg.RNSVGSvgViewManager.java

License:Open Source License

@Override
@Nullable//from  www .j av a 2s . com
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (RNSVGSvgView.Events event : RNSVGSvgView.Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}