소스 검색

Set Modal style from screen

This commit also fixes issue where style was not cleared when changing
tabs, and when pushing or popping screens.
Guy Carmeli 8 년 전
부모
커밋
972b5ae0df

+ 6
- 17
android/app/src/main/java/com/reactnativenavigation/activities/BaseReactActivity.java 파일 보기

@@ -29,7 +29,7 @@ import com.reactnativenavigation.core.objects.Button;
29 29
 import com.reactnativenavigation.core.objects.Screen;
30 30
 import com.reactnativenavigation.packages.RnnPackage;
31 31
 import com.reactnativenavigation.utils.ContextProvider;
32
-import com.reactnativenavigation.utils.SdkSupports;
32
+import com.reactnativenavigation.utils.StyleHelper;
33 33
 import com.reactnativenavigation.views.RnnToolBar;
34 34
 
35 35
 import java.util.Arrays;
@@ -170,24 +170,12 @@ public abstract class BaseReactActivity extends AppCompatActivity implements Def
170 170
         setContentView(mReactRootView);
171 171
     }
172 172
 
173
-    public void setNavigationColors(Screen screen) {
174
-        if (screen.toolBarColor != null) {
175
-            mToolbar.setBackgroundColor(screen.toolBarColor);
173
+    public void setNavigationStyle(Screen screen) {
174
+        if (mToolbar != null) {
175
+            mToolbar.setStyle(screen);
176 176
         }
177 177
 
178
-        if (screen.titleColor != null) {
179
-            mToolbar.setTitleTextColor(screen.titleColor);
180
-        }
181
-
182
-        if (SdkSupports.lollipop()) {
183
-            if (screen.statusBarColor != null) {
184
-                getWindow().setStatusBarColor(screen.statusBarColor);
185
-            }
186
-
187
-            if (screen.navigationBarColor != null) {
188
-                getWindow().setNavigationBarColor(screen.navigationBarColor);
189
-            }
190
-        }
178
+        StyleHelper.setWindowStyle(getWindow(), this, screen);
191 179
     }
192 180
 
193 181
     @Override
@@ -227,6 +215,7 @@ public abstract class BaseReactActivity extends AppCompatActivity implements Def
227 215
 
228 216
     @CallSuper
229 217
     public void push(Screen screen) {
218
+        setNavigationStyle(screen);
230 219
         if (mToolbar != null &&
231 220
             getCurrentNavigatorId().equals(screen.navigatorId) &&
232 221
             getScreenStackSize() >= 1) {

+ 5
- 2
android/app/src/main/java/com/reactnativenavigation/activities/SingleScreenActivity.java 파일 보기

@@ -36,7 +36,7 @@ public class SingleScreenActivity extends BaseReactActivity {
36 36
     }
37 37
 
38 38
     protected void setupToolbar(Screen screen) {
39
-        setNavigationColors(screen);
39
+        setNavigationStyle(screen);
40 40
         mToolbar.setTitle(screen.title);
41 41
         setSupportActionBar(mToolbar);
42 42
     }
@@ -44,13 +44,16 @@ public class SingleScreenActivity extends BaseReactActivity {
44 44
     @Override
45 45
     public void push(Screen screen) {
46 46
         super.push(screen);
47
+        setNavigationStyle(screen);
47 48
         mScreenStack.push(screen);
48 49
     }
49 50
 
50 51
     @Override
51 52
     public Screen pop(String navigatorId) {
52 53
         super.pop(navigatorId);
53
-        return mScreenStack.pop();
54
+        Screen screen = mScreenStack.pop();
55
+        setNavigationStyle(screen);
56
+        return screen;
54 57
     }
55 58
 
56 59
     @Override

+ 11
- 19
android/app/src/main/java/com/reactnativenavigation/activities/TabActivity.java 파일 보기

@@ -1,6 +1,5 @@
1 1
 package com.reactnativenavigation.activities;
2 2
 
3
-import android.support.design.widget.TabLayout;
4 3
 import android.support.v4.view.ViewPager;
5 4
 import android.view.Menu;
6 5
 
@@ -8,6 +7,7 @@ import com.reactnativenavigation.R;
8 7
 import com.reactnativenavigation.adapters.ViewPagerAdapter;
9 8
 import com.reactnativenavigation.core.RctManager;
10 9
 import com.reactnativenavigation.core.objects.Screen;
10
+import com.reactnativenavigation.views.RnnTabLayout;
11 11
 import com.reactnativenavigation.views.RnnToolBar;
12 12
 
13 13
 import java.util.ArrayList;
@@ -18,7 +18,7 @@ import java.util.ArrayList;
18 18
 public class TabActivity extends BaseReactActivity {
19 19
     public static final String EXTRA_SCREENS = "extraScreens";
20 20
 
21
-    private TabLayout mTabLayout;
21
+    private RnnTabLayout mTabLayout;
22 22
     private ViewPager mViewPager;
23 23
     private ViewPagerAdapter mAdapter;
24 24
 
@@ -28,7 +28,7 @@ public class TabActivity extends BaseReactActivity {
28 28
 
29 29
         setContentView(R.layout.tab_activity);
30 30
         mToolbar = (RnnToolBar) findViewById(R.id.toolbar);
31
-        mTabLayout = (TabLayout) findViewById(R.id.tabLayout);
31
+        mTabLayout = (RnnTabLayout) findViewById(R.id.tabLayout);
32 32
         mViewPager = (ViewPager) findViewById(R.id.viewPager);
33 33
 
34 34
         ArrayList<Screen> screens = (ArrayList<Screen>) getIntent().getSerializableExtra(EXTRA_SCREENS);
@@ -39,26 +39,16 @@ public class TabActivity extends BaseReactActivity {
39 39
 
40 40
     private void setupToolbar(ArrayList<Screen> screens) {
41 41
         Screen initialScreen = screens.get(0);
42
-        setNavigationColors(initialScreen);
42
+        setNavigationStyle(initialScreen);
43 43
         mToolbar.setScreens(screens);
44
-        mToolbar.setTitle(initialScreen.title == null ? "" : initialScreen.title);
44
+        mToolbar.setTitle(initialScreen.title);
45 45
         setSupportActionBar(mToolbar);
46 46
     }
47 47
 
48 48
     @Override
49
-    public void setNavigationColors(Screen screen) {
50
-        super.setNavigationColors(screen);
51
-        if (screen.toolBarColor != null) {
52
-            mTabLayout.setBackgroundColor(screen.toolBarColor);
53
-        }
54
-
55
-        if (screen.tabNormalTextColor != null && screen.tabSelectedTextColor != null) {
56
-            mTabLayout.setTabTextColors(screen.tabNormalTextColor, screen.tabSelectedTextColor);
57
-        }
58
-
59
-        if (screen.tabIndicatorColor != null) {
60
-            mTabLayout.setSelectedTabIndicatorColor(screen.tabIndicatorColor);
61
-        }
49
+    public void setNavigationStyle(Screen screen) {
50
+        super.setNavigationStyle(screen);
51
+        mTabLayout.setStyle(screen);
62 52
     }
63 53
 
64 54
     private void setupViewPager(ArrayList<Screen> screens) {
@@ -85,7 +75,9 @@ public class TabActivity extends BaseReactActivity {
85 75
     @Override
86 76
     public Screen pop(String navigatorId) {
87 77
         super.pop(navigatorId);
88
-        return mAdapter.pop(navigatorId);
78
+        Screen screen = mAdapter.pop(navigatorId);
79
+        setNavigationStyle(screen);
80
+        return screen;
89 81
     }
90 82
 
91 83
     @Override

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/adapters/ViewPagerAdapter.java 파일 보기

@@ -11,6 +11,7 @@ import com.facebook.react.bridge.WritableMap;
11 11
 import com.reactnativenavigation.activities.BaseReactActivity;
12 12
 import com.reactnativenavigation.core.RctManager;
13 13
 import com.reactnativenavigation.core.objects.Screen;
14
+import com.reactnativenavigation.utils.ContextProvider;
14 15
 import com.reactnativenavigation.views.RnnToolBar;
15 16
 import com.reactnativenavigation.views.ScreenStack;
16 17
 
@@ -109,6 +110,9 @@ public class ViewPagerAdapter extends PagerAdapter implements TabLayout.OnTabSel
109 110
         // Set title
110 111
         mToolbar.setTitle(newScreen.title == null ? "" : newScreen.title);
111 112
 
113
+        // Set navigation color
114
+        ContextProvider.getActivityContext().setNavigationStyle(newScreen);
115
+
112 116
         // Send tab selected event
113 117
         WritableMap params = Arguments.createMap();
114 118
         Screen screen = mScreenStacks.get(position).peek();

+ 14
- 12
android/app/src/main/java/com/reactnativenavigation/core/objects/Screen.java 파일 보기

@@ -36,14 +36,14 @@ public class Screen extends JsonObject implements Serializable {
36 36
     private static final String KEY_TAB_SELECTED_TEXT_COLOR = "tabSelectedTextColor";
37 37
     private static final String KEY_TAB_INDICATOR_COLOR = "tabIndicatorColor";
38 38
 
39
-    public String title;
40
-    public String label;
41
-    public String screenId;
42
-    public String screenInstanceId;
43
-    public String navigatorId;
44
-    public String navigatorEventId;
45
-    public int icon;
46
-    public ArrayList<Button> buttons;
39
+    public final String title;
40
+    public final String label;
41
+    public final String screenId;
42
+    public final String screenInstanceId;
43
+    public final String navigatorId;
44
+    public final String navigatorEventId;
45
+    public final int icon;
46
+    public final ArrayList<Button> buttons;
47 47
 
48 48
     // Navigation styling
49 49
     @Nullable @ColorInt public Integer toolBarColor;
@@ -69,18 +69,20 @@ public class Screen extends JsonObject implements Serializable {
69 69
         navigatorEventId = getString(screen, KEY_NAVIGATOR_EVENT_ID);
70 70
         icon = getInt(screen, KEY_ICON);
71 71
 
72
-        setButtons(screen);
72
+        buttons = getButtons(screen);
73 73
         setToolbarStyle(screen);
74 74
     }
75 75
 
76
-    private void setButtons(ReadableMap screen) {
76
+    private ArrayList<Button> getButtons(ReadableMap screen) {
77
+        ArrayList<Button> ret = null;
77 78
         if (screen.hasKey(KEY_RIGHT_BUTTONS)) {
78
-            buttons = new ArrayList<>();
79
+            ret = new ArrayList<>();
79 80
             ReadableArray rightButtons = screen.getArray(KEY_RIGHT_BUTTONS);
80 81
             for (int i = 0; i < rightButtons.size(); i++) {
81
-                buttons.add(new Button(rightButtons.getMap(i)));
82
+                ret.add(new Button(rightButtons.getMap(i)));
82 83
             }
83 84
         }
85
+        return ret;
84 86
     }
85 87
 
86 88
     public void setToolbarStyle(ReadableMap screen) {

+ 17
- 1
android/app/src/main/java/com/reactnativenavigation/modal/RnnModal.java 파일 보기

@@ -7,6 +7,7 @@ import android.content.DialogInterface;
7 7
 import android.view.LayoutInflater;
8 8
 import android.view.View;
9 9
 import android.view.Window;
10
+import android.view.WindowManager;
10 11
 import android.view.animation.Animation;
11 12
 import android.view.animation.AnimationUtils;
12 13
 
@@ -14,7 +15,10 @@ import com.reactnativenavigation.R;
14 15
 import com.reactnativenavigation.activities.BaseReactActivity;
15 16
 import com.reactnativenavigation.controllers.ModalController;
16 17
 import com.reactnativenavigation.core.objects.Screen;
18
+import com.reactnativenavigation.utils.SdkSupports;
19
+import com.reactnativenavigation.utils.StyleHelper;
17 20
 import com.reactnativenavigation.views.RctView;
21
+import com.reactnativenavigation.views.RnnToolBar;
18 22
 import com.reactnativenavigation.views.ScreenStack;
19 23
 
20 24
 /**
@@ -23,8 +27,8 @@ import com.reactnativenavigation.views.ScreenStack;
23 27
 public class RnnModal extends Dialog implements DialogInterface.OnDismissListener {
24 28
 
25 29
     private ScreenStack mScreenStack;
26
-    private Screen mScreen;
27 30
     private View mContentView;
31
+    private Screen mScreen;
28 32
 
29 33
     public RnnModal(BaseReactActivity context, Screen screen) {
30 34
         super(context, R.style.Modal);
@@ -37,8 +41,13 @@ public class RnnModal extends Dialog implements DialogInterface.OnDismissListene
37 41
     private void init(final Context context) {
38 42
         requestWindowFeature(Window.FEATURE_NO_TITLE);
39 43
         mContentView = LayoutInflater.from(context).inflate(R.layout.modal_layout, null, false);
44
+        RnnToolBar toolBar = (RnnToolBar) mContentView.findViewById(R.id.toolbar);
40 45
         mScreenStack = (ScreenStack) mContentView.findViewById(R.id.screenStack);
46
+
41 47
         setContentView(mContentView);
48
+        toolBar.setStyle(mScreen);
49
+        toolBar.setTitle(mScreen.title);
50
+        toolBar.setupToolbarButtonsAsync(mScreen);
42 51
         mScreenStack.push(mScreen, new RctView.OnDisplayedListener() {
43 52
             @Override
44 53
             public void onDisplayed() {
@@ -47,6 +56,13 @@ public class RnnModal extends Dialog implements DialogInterface.OnDismissListene
47 56
                 mContentView.animate();
48 57
             }
49 58
         });
59
+
60
+        // Set navigation colors
61
+        if (SdkSupports.lollipop()) {
62
+            Window window = getWindow();
63
+            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
64
+            StyleHelper.setWindowStyle(window, context.getApplicationContext(), mScreen);
65
+        }
50 66
     }
51 67
 
52 68
     public void push(Screen screen) {

+ 0
- 1
android/app/src/main/java/com/reactnativenavigation/modules/RctActivityModule.java 파일 보기

@@ -133,7 +133,6 @@ public class RctActivityModule extends ReactContextBaseJavaModule {
133 133
                 context.pop(navigatorId);
134 134
             }
135 135
         });
136
-
137 136
     }
138 137
 
139 138
     @ReactMethod

+ 30
- 0
android/app/src/main/java/com/reactnativenavigation/utils/StyleHelper.java 파일 보기

@@ -0,0 +1,30 @@
1
+package com.reactnativenavigation.utils;
2
+
3
+import android.content.Context;
4
+import android.support.v4.content.ContextCompat;
5
+import android.view.Window;
6
+
7
+import com.reactnativenavigation.core.objects.Screen;
8
+
9
+/**
10
+ * Created by guyc on 07/05/16.
11
+ */
12
+public class StyleHelper {
13
+    public static void setWindowStyle(Window window, Context context, Screen screen) {
14
+        if (SdkSupports.lollipop()) {
15
+            final int black = ContextCompat.getColor(context, android.R.color.black);
16
+            if (screen.statusBarColor != null) {
17
+                window.setStatusBarColor(screen.statusBarColor);
18
+            } else {
19
+                window.setStatusBarColor(black);
20
+            }
21
+
22
+            if (screen.navigationBarColor != null) {
23
+                window.setNavigationBarColor(screen.navigationBarColor);
24
+            } else {
25
+                window.setNavigationBarColor(black);
26
+            }
27
+        }
28
+
29
+    }
30
+}

+ 77
- 0
android/app/src/main/java/com/reactnativenavigation/views/RnnTabLayout.java 파일 보기

@@ -0,0 +1,77 @@
1
+package com.reactnativenavigation.views;
2
+
3
+import android.content.Context;
4
+import android.content.res.ColorStateList;
5
+import android.content.res.TypedArray;
6
+import android.graphics.drawable.Drawable;
7
+import android.support.design.widget.TabLayout;
8
+import android.util.AttributeSet;
9
+import android.util.TypedValue;
10
+
11
+import com.reactnativenavigation.R;
12
+import com.reactnativenavigation.core.objects.Screen;
13
+
14
+/**
15
+ * Created by guyc on 07/05/16.
16
+ */
17
+public class RnnTabLayout extends TabLayout {
18
+    private Drawable mBackground;
19
+    private ColorStateList mTabTextColors;
20
+    private int mSelectedTabIndicatorColor;
21
+
22
+    public RnnTabLayout(Context context) {
23
+        this(context, null);
24
+    }
25
+
26
+    public RnnTabLayout(Context context, AttributeSet attrs) {
27
+        this(context, attrs, 0);
28
+    }
29
+
30
+    public RnnTabLayout(Context context, AttributeSet attrs, int defStyleAttr) {
31
+        super(context, attrs, defStyleAttr);
32
+        init(context);
33
+    }
34
+
35
+    private void init(Context ctx) {
36
+        mBackground = getBackground();
37
+        mTabTextColors = getTabTextColors();
38
+
39
+        // Get default accent color which is used as the selected tab indicator color
40
+        TypedValue typedValue = new TypedValue();
41
+        TypedArray a = ctx.obtainStyledAttributes(typedValue.data, new int[]{R.attr.colorAccent});
42
+        mSelectedTabIndicatorColor = a.getColor(0, 0);
43
+        a.recycle();
44
+    }
45
+
46
+    public void setStyle(Screen screen) {
47
+        if (screen.toolBarColor != null) {
48
+            setBackgroundColor(screen.toolBarColor);
49
+        } else {
50
+            resetBackground();
51
+        }
52
+
53
+        if (screen.tabNormalTextColor != null && screen.tabSelectedTextColor != null) {
54
+            setTabTextColors(screen.tabNormalTextColor, screen.tabSelectedTextColor);
55
+        } else {
56
+            resetTextColors();
57
+        }
58
+
59
+        if (screen.tabIndicatorColor != null) {
60
+            setSelectedTabIndicatorColor(screen.tabIndicatorColor);
61
+        } else {
62
+            resetSelectedTabIndicatorColor();
63
+        }
64
+    }
65
+
66
+    public void resetBackground() {
67
+        setBackground(mBackground);
68
+    }
69
+
70
+    public void resetTextColors() {
71
+        setTabTextColors(mTabTextColors);
72
+    }
73
+
74
+    public void resetSelectedTabIndicatorColor() {
75
+        setSelectedTabIndicatorColor(mSelectedTabIndicatorColor);
76
+    }
77
+}

+ 36
- 1
android/app/src/main/java/com/reactnativenavigation/views/RnnToolBar.java 파일 보기

@@ -5,6 +5,7 @@ import android.content.Context;
5 5
 import android.content.res.Resources;
6 6
 import android.graphics.drawable.Drawable;
7 7
 import android.os.AsyncTask;
8
+import android.support.v4.content.ContextCompat;
8 9
 import android.support.v4.content.res.ResourcesCompat;
9 10
 import android.support.v7.app.ActionBar;
10 11
 import android.support.v7.widget.Toolbar;
@@ -32,27 +33,62 @@ public class RnnToolBar extends Toolbar {
32 33
 
33 34
     private List<Screen> mScreens;
34 35
     private AsyncTask mSetupToolbarTask;
36
+    private Drawable mBackground;
35 37
 
36 38
     public RnnToolBar(Context context) {
37 39
         super(context);
40
+        init();
38 41
     }
39 42
 
40 43
     public RnnToolBar(Context context, AttributeSet attrs) {
41 44
         super(context, attrs);
45
+        init();
42 46
     }
43 47
 
44 48
     public RnnToolBar(Context context, AttributeSet attrs, int defStyleAttr) {
45 49
         super(context, attrs, defStyleAttr);
50
+        init();
51
+    }
52
+
53
+    private void init() {
54
+        mBackground = getBackground();
46 55
     }
47 56
 
48 57
     public void setScreens(List<Screen> screens) {
49 58
         mScreens = screens;
50 59
     }
51 60
 
61
+    public void setStyle(Screen screen) {
62
+        if (screen.toolBarColor != null) {
63
+            setBackgroundColor(screen.toolBarColor);
64
+        } else {
65
+            resetBackground();
66
+        }
67
+
68
+        if (screen.titleColor != null) {
69
+            setTitleTextColor(screen.titleColor);
70
+        } else {
71
+            resetTitleTextColor();
72
+        }
73
+    }
74
+
75
+    private void resetBackground() {
76
+        setBackground(mBackground);
77
+    }
78
+
79
+    private void resetTitleTextColor() {
80
+        setTitleTextColor(ContextCompat.getColor(getContext(), android.R.color.primary_text_light));
81
+    }
82
+
52 83
     public void handleOnCreateOptionsMenuAsync() {
53 84
         setupToolbarButtonsAsync(null, mScreens.get(0));
54 85
     }
55 86
 
87
+    public void setupToolbarButtonsAsync(Screen newScreen) {
88
+        this.setupToolbarButtonsAsync(null, newScreen);
89
+    }
90
+
91
+
56 92
     public void setupToolbarButtonsAsync(Screen oldScreen, Screen newScreen) {
57 93
         if (mSetupToolbarTask == null) {
58 94
             mSetupToolbarTask = new SetupToolbarButtonsTask(this, oldScreen, newScreen).execute();
@@ -62,7 +98,6 @@ public class RnnToolBar extends Toolbar {
62 98
     @SuppressWarnings({"ConstantConditions"})
63 99
     public void showBackButton(Screen screen) {
64 100
         ActionBar actionBar = ContextProvider.getActivityContext().getSupportActionBar();
65
-
66 101
         Drawable backButton = setupBackButton(screen);
67 102
         actionBar.setHomeAsUpIndicator(backButton);
68 103
         actionBar.setDisplayHomeAsUpEnabled(true);

+ 7
- 3
android/app/src/main/res/anim/slide_down.xml 파일 보기

@@ -1,8 +1,12 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <set xmlns:android="http://schemas.android.com/apk/res/android"
3
-     android:interpolator="@android:anim/accelerate_interpolator">
3
+    android:interpolator="@android:anim/accelerate_interpolator"
4
+    android:shareInterpolator="true"
5
+    android:duration="190">
4 6
     <translate
5 7
         android:fromYDelta="0"
6
-        android:toYDelta="100%"
7
-        android:duration="190"/>
8
+        android:toYDelta="100%"/>
9
+    <alpha
10
+        android:fromAlpha="1"
11
+        android:toAlpha="0"/>
8 12
 </set>

+ 1
- 1
android/app/src/main/res/layout/tab_activity.xml 파일 보기

@@ -17,7 +17,7 @@
17 17
             android:layout_width="match_parent"
18 18
             android:layout_height="?attr/actionBarSize"
19 19
             app:layout_scrollFlags="scroll|enterAlways"/>
20
-        <android.support.design.widget.TabLayout
20
+        <com.reactnativenavigation.views.RnnTabLayout
21 21
             android:id="@+id/tabLayout"
22 22
             android:layout_width="match_parent"
23 23
             android:layout_height="?attr/actionBarSize"

+ 1
- 1
example-redux/src/screens/index.js 파일 보기

@@ -1,4 +1,4 @@
1
-import { Navigation } from 'react-native-navigation';
1
+import {Navigation} from 'react-native-navigation';
2 2
 
3 3
 import LoginScreen from './LoginScreen';
4 4
 import FirstTabScreen from './FirstTabScreen';

+ 7
- 5
src/platformSpecific.android.js 파일 보기

@@ -21,7 +21,7 @@ function startSingleScreenApp(params) {
21 21
 
22 22
   addNavigatorParams(screen);
23 23
   addNavigatorButtons(screen);
24
-  addToolbarStyleParams(screen);
24
+  addNavigationStyleParams(screen);
25 25
   RctActivity.startSingleScreenApp(screen);
26 26
 }
27 27
 
@@ -34,7 +34,7 @@ function startTabBasedApp(params) {
34 34
   params.tabs.forEach(function (tab, idx) {
35 35
     addNavigatorParams(tab, null, idx)
36 36
     addNavigatorButtons(tab);
37
-    addToolbarStyleParams(tab);
37
+    addNavigationStyleParams(tab);
38 38
   });
39 39
 
40 40
   RctActivity.startTabBasedApp(params.tabs);
@@ -43,7 +43,7 @@ function startTabBasedApp(params) {
43 43
 function navigatorPush(navigator, params) {
44 44
   addNavigatorParams(params, navigator)
45 45
   addNavigatorButtons(params);
46
-  addToolbarStyleParams(params);
46
+  addNavigationStyleParams(params);
47 47
   RctActivity.navigatorPush(params);
48 48
 }
49 49
 
@@ -52,7 +52,9 @@ function navigatorPop(navigator, params) {
52 52
 }
53 53
 
54 54
 function showModal(params) {
55
-  addNavigatorParams(params)
55
+  addNavigatorParams(params);
56
+  addNavigatorButtons(params);
57
+  addNavigationStyleParams(params);
56 58
   RctActivity.showModal(params);
57 59
 }
58 60
 
@@ -79,7 +81,7 @@ function addNavigatorButtons(screen) {
79 81
   }
80 82
 }
81 83
 
82
-function addToolbarStyleParams(screen) {
84
+function addNavigationStyleParams(screen) {
83 85
   const Screen = Navigation.getRegisteredScreen(screen.screen);
84 86
   screen.navigatorStyle = Screen.navigatorStyle;
85 87
 }