Search in sources :

Example 26 with WritableMap

use of com.facebook.react.bridge.WritableMap in project react-native-navigation by wix.

the class TitleBarSearchButton method onQueryTextChange.

@Override
public boolean onQueryTextChange(String newText) {
    WritableMap arguments = Arguments.createMap();
    arguments.putString("query", newText);
    sendEvent("searchQueryChange", arguments);
    return false;
}
Also used : WritableMap(com.facebook.react.bridge.WritableMap)

Example 27 with WritableMap

use of com.facebook.react.bridge.WritableMap in project react-native-navigation by wix.

the class OrientationHelper method onConfigurationChanged.

public static void onConfigurationChanged(Configuration newConfig) {
    WritableMap params = Arguments.createMap();
    params.putString("orientation", Orientation.fromConfigurationCode(newConfig.orientation));
    NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("orientationChanged", params);
}
Also used : WritableMap(com.facebook.react.bridge.WritableMap)

Example 28 with WritableMap

use of com.facebook.react.bridge.WritableMap in project react-native-navigation by wix.

the class EventEmitter method sendGlobalScreenChangedEvent.

private void sendGlobalScreenChangedEvent(String eventId, double timestamp, String screenId, NavigationType type) {
    WritableMap map = Arguments.createMap();
    map.putDouble("startTime", timestamp);
    map.putDouble("endTime", System.currentTimeMillis());
    map.putString("screen", screenId);
    map.putString("commandType", String.valueOf(type));
    sendNavigatorEvent(eventId, map);
}
Also used : WritableMap(com.facebook.react.bridge.WritableMap)

Example 29 with WritableMap

use of com.facebook.react.bridge.WritableMap in project react-native-navigation by wix.

the class BottomTabsLayout method createTabSelectedEventData.

private WritableMap createTabSelectedEventData(int selectedTabIndex, int unselectedTabIndex) {
    WritableMap data = Arguments.createMap();
    data.putInt("selectedTabIndex", selectedTabIndex);
    data.putInt("unselectedTabIndex", unselectedTabIndex);
    return data;
}
Also used : WritableMap(com.facebook.react.bridge.WritableMap)

Example 30 with WritableMap

use of com.facebook.react.bridge.WritableMap in project react-native-navigation by wix.

the class BottomTabsLayout method sendTabReselectedEventToJs.

private void sendTabReselectedEventToJs() {
    WritableMap data = Arguments.createMap();
    String navigatorEventId = getCurrentScreenStack().peek().getNavigatorEventId();
    NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("bottomTabReselected", navigatorEventId, data);
}
Also used : WritableMap(com.facebook.react.bridge.WritableMap)

Aggregations

WritableMap (com.facebook.react.bridge.WritableMap)54 ReactContext (com.facebook.react.bridge.ReactContext)5 ThemedReactContext (com.facebook.react.uimanager.ThemedReactContext)4 Intent (android.content.Intent)3 WritableNativeMap (com.facebook.react.bridge.WritableNativeMap)3 RCTEventEmitter (com.facebook.react.uimanager.events.RCTEventEmitter)3 IOException (java.io.IOException)3 BroadcastReceiver (android.content.BroadcastReceiver)2 Context (android.content.Context)2 IntentFilter (android.content.IntentFilter)2 MediaMetadataRetriever (android.media.MediaMetadataRetriever)2 Bundle (android.os.Bundle)2 View (android.view.View)2 Callback (com.facebook.react.bridge.Callback)2 ReactApplicationContext (com.facebook.react.bridge.ReactApplicationContext)2 ReadableMap (com.facebook.react.bridge.ReadableMap)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 JSONArray (org.json.JSONArray)2 JSONObject (org.json.JSONObject)2