Browse Source

getting it to run

Daniel Zlotin 8 years ago
parent
commit
3053adcbc9

+ 3
- 1
android/app/src/main/java/com/reactnativenavigation/controllers/SplashActivity.java View File

@@ -5,12 +5,14 @@ import android.support.annotation.Nullable;
5 5
 import android.support.v7.app.AppCompatActivity;
6 6
 import android.widget.Toast;
7 7
 
8
+import com.reactnativenavigation.NavigationApplication;
9
+
8 10
 public abstract class SplashActivity extends AppCompatActivity {
9 11
 
10 12
     @Override
11 13
     protected void onCreate(@Nullable Bundle savedInstanceState) {
12 14
         super.onCreate(savedInstanceState);
13 15
         //TODO show fancy splash
14
-        Toast.makeText(this, "Loading navigation...", Toast.LENGTH_SHORT).show();
16
+        Toast.makeText(this, "Loading navigation...", Toast.LENGTH_LONG).show();
15 17
     }
16 18
 }

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/params/parsers/ActivityParamsParser.java View File

@@ -7,7 +7,7 @@ import com.reactnativenavigation.params.ActivityParams;
7 7
 public class ActivityParamsParser {
8 8
     public static ActivityParams parse(Bundle params) {
9 9
         ActivityParams result = new ActivityParams();
10
-        result.screenParams = ScreenParamsParser.parse(params);
10
+        result.screenParams = ScreenParamsParser.parse(params.getBundle("screen"));
11 11
         return result;
12 12
     }
13 13
 }

+ 12
- 0
example-redux/android/app/src/main/java/com/exampleredux/App.java View File

@@ -1,10 +1,22 @@
1 1
 package com.exampleredux;
2 2
 
3
+import android.support.annotation.NonNull;
4
+
5
+import com.facebook.react.ReactPackage;
3 6
 import com.reactnativenavigation.NavigationApplication;
4 7
 
8
+import java.util.Collections;
9
+import java.util.List;
10
+
5 11
 public class App extends NavigationApplication {
6 12
     @Override
7 13
     public boolean isDebug() {
8 14
         return BuildConfig.DEBUG;
9 15
     }
16
+
17
+    @NonNull
18
+    @Override
19
+    public List<ReactPackage> createAdditionalReactPackages() {
20
+        return Collections.emptyList();
21
+    }
10 22
 }

+ 2
- 3
example-redux/android/app/src/main/java/com/exampleredux/MainActivity.java View File

@@ -1,7 +1,6 @@
1 1
 package com.exampleredux;
2 2
 
3
-import com.reactnativenavigation.controllers.NavigationActivity;
4
-
5
-public class MainActivity extends NavigationActivity {
3
+import com.reactnativenavigation.controllers.SplashActivity;
6 4
 
5
+public class MainActivity extends SplashActivity {
7 6
 }

+ 1
- 0
src/platformSpecific.ios.js View File

@@ -0,0 +1 @@
1
+module.exports = {};

+ 2
- 1
src/platformSpecificDeprecated.android.js View File

@@ -1,6 +1,7 @@
1 1
 import React, {Component} from 'react';
2 2
 import {AppRegistry, NativeModules} from 'react-native';
3 3
 import _ from 'lodash';
4
+import utils from './utils';
4 5
 
5 6
 import Navigation from './Navigation';
6 7
 
@@ -20,7 +21,7 @@ function startSingleScreenApp(params) {
20 21
   screen.passProps = params.passProps;
21 22
   //const drawer = setupDrawer(params.drawer);
22 23
 
23
-  params.screenId = screen.screen;
24
+  screen.screenId = screen.screen;
24 25
   newPlatformSpecific.startApp(params);
25 26
 }
26 27