|
@@ -13,15 +13,19 @@ import com.reactnativenavigation.viewcontrollers.ViewController;
|
13
|
13
|
public class ReactRootViewController extends ViewController {
|
14
|
14
|
|
15
|
15
|
private final String name;
|
16
|
|
- private final String title;
|
|
16
|
+ private final NavigationOptions navigationOptions;
|
17
|
17
|
private final ReactInstanceManager reactInstanceManager;
|
18
|
18
|
private boolean attachedToReactInstance = false;
|
19
|
19
|
private ReactRootView reactRootView;
|
20
|
20
|
|
21
|
|
- public ReactRootViewController(final Activity activity, final String id, final String name, final String title, final ReactInstanceManager reactInstanceManager) {
|
|
21
|
+ public ReactRootViewController(final Activity activity,
|
|
22
|
+ final String id,
|
|
23
|
+ final String name,
|
|
24
|
+ final NavigationOptions navigationOptions,
|
|
25
|
+ final ReactInstanceManager reactInstanceManager) {
|
22
|
26
|
super(activity, id);
|
23
|
27
|
this.name = name;
|
24
|
|
- this.title = title;
|
|
28
|
+ this.navigationOptions = navigationOptions;
|
25
|
29
|
this.reactInstanceManager = reactInstanceManager;
|
26
|
30
|
}
|
27
|
31
|
|
|
@@ -35,7 +39,8 @@ public class ReactRootViewController extends ViewController {
|
35
|
39
|
@Override
|
36
|
40
|
public void onViewAppeared() {
|
37
|
41
|
super.onViewAppeared();
|
38
|
|
- if (getParentStackController() != null) getParentStackController().setTitle(title);
|
|
42
|
+ if (getParentStackController() != null)
|
|
43
|
+ getParentStackController().setTitle(navigationOptions.title);
|
39
|
44
|
new NavigationEvent(reactInstanceManager.getCurrentReactContext()).containerStart(getId());
|
40
|
45
|
}
|
41
|
46
|
|