Browse Source

added showOverlay temp API

Daniel Zlotin 8 years ago
parent
commit
c2ef2608c1

+ 6
- 1
src/Navigation.js View File

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

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

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

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

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

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

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