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

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

Introduction

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

Prototype

public static <K, V> Map<K, V> of(K k1, V v1) 

Source Link

Document

Returns map containing a single entry.

Usage

From source file:cn.tuofeng.modalhost.ReactModalHostManager.java

License:Open Source License

@Override
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.<String, Object>builder()
            .put(DismissEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDismiss")).build();
}

From source file:com.blockablewebview.BlockableWebViewManager.java

License:Open Source License

@Nullable
@Override//from  w ww .j  av a 2s .c om
public Map getExportedCustomDirectEventTypeConstants() {
    HashMap<String, Object> constants = new HashMap<String, Object>();
    constants.put("navigationBlocked", MapBuilder.of("registrationName", "onNavigationBlocked"));

    return constants;
}

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.j  a va  2s .co 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/*ww w  . j av a 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  . ja  v a2  s .  c  om
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.rnnestedscrollview.ReactNestedScrollViewManager.java

License:MIT License

public static Map<String, Object> createExportedCustomDirectEventTypeConstants() {
    return MapBuilder.<String, Object>builder()
            .put(ScrollEventType.getJSEventName(ScrollEventType.SCROLL),
                    MapBuilder.of("registrationName", "onScroll"))
            .put(ScrollEventType.getJSEventName(ScrollEventType.BEGIN_DRAG),
                    MapBuilder.of("registrationName", "onScrollBeginDrag"))
            .put(ScrollEventType.getJSEventName(ScrollEventType.END_DRAG),
                    MapBuilder.of("registrationName", "onScrollEndDrag"))
            .put(ScrollEventType.getJSEventName(ScrollEventType.MOMENTUM_BEGIN),
                    MapBuilder.of("registrationName", "onMomentumScrollBegin"))
            .put(ScrollEventType.getJSEventName(ScrollEventType.MOMENTUM_END),
                    MapBuilder.of("registrationName", "onMomentumScrollEnd"))
            .build();//from w  w  w. j a  v a 2s.  c o m
}

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

License:Open Source License

@Nullable
@Override//from  w w w.ja  v  a  2 s  .  co 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:com.tuniu.rnbrige.SwipeRefreshLayoutManager.java

License:Open Source License

@Override
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    return MapBuilder.<String, Object>builder()
            .put("topRefresh", MapBuilder.of("registrationName", "onRefresh"))
            .put("loadmore", MapBuilder.of("registrationName", "onLoadmore")).build();
}