Просмотр исходного кода

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 7 лет назад
Родитель
Сommit
bf09cfd885
1 измененных файлов: 7 добавлений и 3 удалений
  1. 7
    3
      docs/installation-android.md

+ 7
- 3
docs/installation-android.md Просмотреть файл

@@ -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
 	}