Quellcode durchsuchen

Edited how to return additional packages (#1161)

Docs weren't very clear on how exactly to return additional packages, i.e., as a <ReactPackages> list [Line 65]. 
Also changed MyApplication to MainApplication on line 54 (if that is a default and hasn't been changed by the developer).
Eshwar Ramesh vor 7 Jahren
Ursprung
Commit
bf09cfd885
1 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen
  1. 7
    3
      docs/installation-android.md

+ 7
- 3
docs/installation-android.md Datei anzeigen

@@ -51,7 +51,7 @@ First add `react-native-navigation` as an npm dependency: `yarn add react-native
51 51
 	```java
52 52
 	import com.reactnativenavigation.NavigationApplication;
53 53
 	
54
-	public class MyApplication extends NavigationApplication {
54
+	public class MainApplication extends NavigationApplication {
55 55
  
56 56
     	@Override
57 57
 		public boolean isDebug() {
@@ -61,8 +61,12 @@ First add `react-native-navigation` as an npm dependency: `yarn add react-native
61 61
 
62 62
 	    @Override
63 63
 	    public List<ReactPackage> createAdditionalReactPackages() {
64
-		    // Add the packages you require here.
65
-			// No need to add RnnPackage and MainReactPackage
64
+		// Add the packages you require here like so... (Tested on RN 0.42)
65
+		return Arrays.<ReactPackage>asList(
66
+           	    new <InsertPackageName()>;
67
+       		);
68
+		// No need to add RnnPackage and MainReactPackage
69
+		// Simply return null if you do not have additional packages    
66 70
 	        return null;
67 71
 	    }
68 72
 	}