1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- import React, {Component} from 'react';
- import {AppRegistry, NativeModules} from 'react-native';
- import _ from 'lodash';
-
- import Navigation from './Navigation';
-
- const NativeReactModule = NativeModules.NavigationReactModule;
-
- function startApp(activityParams) {
- NativeReactModule.startApp(activityParams);
- }
-
- function push(screenParams) {
- NativeReactModule.push(screenParams);
- }
-
- function pop(screenParams) {
- NativeReactModule.pop(screenParams);
- }
-
- function popToRoot(screenParams) {
- NativeReactModule.popToRoot(screenParams);
- }
-
- function newStack(screenParams) {
- NativeReactModule.newStack(screenParams);
- }
-
- function toggleTopBarVisible(screenInstanceID, visible, animated) {
- NativeReactModule.setTopBarVisible(screenInstanceID, visible, animated);
- }
-
- function toggleBottomTabsVisible(visible, animated) {
- NativeReactModule.setBottomTabsVisible(visible, animated);
- }
-
- function setScreenTitleBarTitle(screenInstanceID, title) {
- NativeReactModule.setScreenTitleBarTitle(screenInstanceID, title);
- }
-
- function setScreenTitleBarButtons(screenInstanceID, navigatorEventID, rightButtons, leftButton) {
- NativeReactModule.setScreenTitleBarButtons(screenInstanceID, navigatorEventID, rightButtons, leftButton);
- }
-
- function showModal(screenParams) {
- NativeReactModule.showModal(screenParams);
- }
-
- function dismissTopModal() {
- NativeReactModule.dismissTopModal();
- }
-
- function dismissAllModals() {
- NativeReactModule.dismissAllModals();
- }
-
- module.exports = {
- startApp,
- push,
- pop,
- popToRoot,
- newStack,
- toggleTopBarVisible,
- toggleBottomTabsVisible,
- setScreenTitleBarTitle,
- setScreenTitleBarButtons,
- showModal,
- dismissTopModal,
- dismissAllModals
- };
|