Browse Source

added showOverlay temp API

Daniel Zlotin 7 years ago
parent
commit
c2ef2608c1

+ 6
- 1
src/Navigation.js View File

@@ -130,6 +130,10 @@ function startSingleScreenApp(params) {
130 130
   return platformSpecific.startSingleScreenApp(params);
131 131
 }
132 132
 
133
+function showOverlay(params) {
134
+  return platformSpecific.showOverlay(params);
135
+}
136
+
133 137
 export default {
134 138
   getRegisteredScreen,
135 139
   registerComponent,
@@ -141,5 +145,6 @@ export default {
141 145
   showInAppNotification: showInAppNotification,
142 146
   dismissInAppNotification: dismissInAppNotification,
143 147
   startTabBasedApp: startTabBasedApp,
144
-  startSingleScreenApp: startSingleScreenApp
148
+  startSingleScreenApp: startSingleScreenApp,
149
+  showOverlay
145 150
 };

+ 7
- 2
src/deprecated/platformSpecificDeprecated.android.js View File

@@ -421,7 +421,7 @@ function getFab(screen) {
421 421
   if (fab === null || fab === undefined) {
422 422
     return;
423 423
   }
424
-  if (Object.keys(fab).length === 0 ) {
424
+  if (Object.keys(fab).length === 0) {
425 425
     return {};
426 426
   }
427 427
 
@@ -539,6 +539,10 @@ function dismissContextualMenu() {
539 539
   newPlatformSpecific.dismissContextualMenu();
540 540
 }
541 541
 
542
+function showOverlay(params) {
543
+  newPlatformSpecific.showOverlay(params);
544
+}
545
+
542 546
 export default {
543 547
   startTabBasedApp,
544 548
   startSingleScreenApp,
@@ -559,5 +563,6 @@ export default {
559 563
   navigatorToggleNavBar,
560 564
   showSnackbar,
561 565
   showContextualMenu,
562
-  dismissContextualMenu
566
+  dismissContextualMenu,
567
+  showOverlay
563 568
 };

+ 11
- 6
src/deprecated/platformSpecificDeprecated.ios.js View File

@@ -77,10 +77,10 @@ function startTabBasedApp(params) {
77 77
                     titleImage={tab.titleImage}
78 78
                     component={tab.screen}
79 79
                     passProps={{
80
-                    navigatorID: tab.navigationParams.navigatorID,
81
-                    screenInstanceID: tab.navigationParams.screenInstanceID,
82
-                    navigatorEventID: tab.navigationParams.navigatorEventID
83
-                  }}
80
+                      navigatorID: tab.navigationParams.navigatorID,
81
+                      screenInstanceID: tab.navigationParams.screenInstanceID,
82
+                      navigatorEventID: tab.navigationParams.navigatorEventID
83
+                    }}
84 84
                     style={tab.navigationParams.navigatorStyle}
85 85
                     leftButtons={tab.navigationParams.navigatorButtons.leftButtons}
86 86
                     rightButtons={tab.navigationParams.navigatorButtons.rightButtons}
@@ -515,7 +515,7 @@ function showInAppNotification(params) {
515 515
     navigatorEventID,
516 516
     navigatorID
517 517
   };
518
-  
518
+
519 519
   savePassProps(params);
520 520
 
521 521
   Notification.show({
@@ -567,6 +567,10 @@ function dismissContextualMenu() {
567 567
   // Android only
568 568
 }
569 569
 
570
+function showOverlay(params) {
571
+  showInAppNotification(params);
572
+}
573
+
570 574
 export default {
571 575
   startTabBasedApp,
572 576
   startSingleScreenApp,
@@ -590,5 +594,6 @@ export default {
590 594
   navigatorSwitchToTab,
591 595
   navigatorToggleNavBar,
592 596
   showContextualMenu,
593
-  dismissContextualMenu
597
+  dismissContextualMenu,
598
+  showOverlay
594 599
 };

+ 7
- 1
src/platformSpecific.android.js View File

@@ -131,6 +131,11 @@ function dismissContextualMenu(screenInstanceID) {
131 131
   NativeReactModule.dismissContextualMenu(screenInstanceID);
132 132
 }
133 133
 
134
+function showOverlay(params) {
135
+  savePassProps(params);
136
+  NativeReactModule.showOverlay(params);
137
+}
138
+
134 139
 module.exports = {
135 140
   startApp,
136 141
   push,
@@ -153,5 +158,6 @@ module.exports = {
153 158
   setBottomTabBadgeByIndex,
154 159
   showSnackbar,
155 160
   showContextualMenu,
156
-  dismissContextualMenu
161
+  dismissContextualMenu,
162
+  showOverlay
157 163
 };