|
@@ -55,7 +55,7 @@ public class RctActivityModule extends ReactContextBaseJavaModule {
|
55
|
55
|
|
56
|
56
|
context.startActivity(intent);
|
57
|
57
|
//TODO add abstract isRoot() instead of instanceof?
|
58
|
|
- if(ContextProvider.getActivityContext() instanceof RootActivity) {
|
|
58
|
+ if (ContextProvider.getActivityContext() instanceof RootActivity) {
|
59
|
59
|
context.overridePendingTransition(0, 0);
|
60
|
60
|
}
|
61
|
61
|
|
|
@@ -66,7 +66,7 @@ public class RctActivityModule extends ReactContextBaseJavaModule {
|
66
|
66
|
|
67
|
67
|
private ArrayList<Screen> createScreens(ReadableArray screens) {
|
68
|
68
|
ArrayList<Screen> ret = new ArrayList<>();
|
69
|
|
- for(int i = 0; i < screens.size(); i++) {
|
|
69
|
+ for (int i = 0; i < screens.size(); i++) {
|
70
|
70
|
ret.add(new Screen(screens.getMap(i)));
|
71
|
71
|
}
|
72
|
72
|
return ret;
|
|
@@ -87,7 +87,7 @@ public class RctActivityModule extends ReactContextBaseJavaModule {
|
87
|
87
|
intent.putExtras(extras);
|
88
|
88
|
|
89
|
89
|
context.startActivity(intent);
|
90
|
|
- if(ContextProvider.getActivityContext() instanceof RootActivity) {
|
|
90
|
+ if (ContextProvider.getActivityContext() instanceof RootActivity) {
|
91
|
91
|
context.overridePendingTransition(0, 0);
|
92
|
92
|
}
|
93
|
93
|
|
|
@@ -306,15 +306,15 @@ public class RctActivityModule extends ReactContextBaseJavaModule {
|
306
|
306
|
public void dismissAllModals(final ReadableMap params) {
|
307
|
307
|
final BaseReactActivity context = ContextProvider.getActivityContext();
|
308
|
308
|
if (context != null && !context.isFinishing()) {
|
309
|
|
- context.runOnUiThread(new Runnable() {
|
310
|
|
- @Override
|
311
|
|
- public void run() {
|
312
|
|
- ModalController modalController = ModalController.getInstance();
|
313
|
|
- if (modalController.isModalDisplayed()) {
|
314
|
|
- modalController.dismissAllModals();
|
|
309
|
+ context.runOnUiThread(new Runnable() {
|
|
310
|
+ @Override
|
|
311
|
+ public void run() {
|
|
312
|
+ ModalController modalController = ModalController.getInstance();
|
|
313
|
+ if (modalController.isModalDisplayed()) {
|
|
314
|
+ modalController.dismissAllModals();
|
|
315
|
+ }
|
315
|
316
|
}
|
316
|
|
- }
|
317
|
|
- });
|
|
317
|
+ });
|
318
|
318
|
}
|
319
|
319
|
}
|
320
|
320
|
|
|
@@ -328,4 +328,19 @@ public class RctActivityModule extends ReactContextBaseJavaModule {
|
328
|
328
|
modalController.dismissModal();
|
329
|
329
|
}
|
330
|
330
|
}
|
|
331
|
+
|
|
332
|
+ @ReactMethod
|
|
333
|
+ public void showFAB(final ReadableMap params) {
|
|
334
|
+ final BaseReactActivity context = ContextProvider.getActivityContext();
|
|
335
|
+ if (context == null || context.isFinishing()) {
|
|
336
|
+ return;
|
|
337
|
+ }
|
|
338
|
+ context.runOnUiThread(new Runnable() {
|
|
339
|
+ @Override
|
|
340
|
+ public void run() {
|
|
341
|
+ context.showFAB(params);
|
|
342
|
+ }
|
|
343
|
+ });
|
|
344
|
+ }
|
|
345
|
+
|
331
|
346
|
}
|