Преглед изворни кода

Fix navigationBarColor in modals

closes #1694
Guy Carmeli пре 7 година
родитељ
комит
fc2a637235

+ 1
- 3
android/app/src/main/java/com/reactnativenavigation/screens/Screen.java Прегледај датотеку

@@ -1,7 +1,6 @@
1 1
 package com.reactnativenavigation.screens;
2 2
 
3 3
 import android.annotation.TargetApi;
4
-import android.app.Activity;
5 4
 import android.content.res.Configuration;
6 5
 import android.graphics.Color;
7 6
 import android.os.Build;
@@ -198,8 +197,7 @@ public abstract class Screen extends RelativeLayout implements Subscriber {
198 197
     public void setNavigationBarColor(StyleParams.Color navigationBarColor) {
199 198
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return;
200 199
 
201
-        final Activity context = (Activity) getContext();
202
-        final Window window = context.getWindow();
200
+        final Window window = ((NavigationActivity) activity).getScreenWindow();
203 201
         if (navigationBarColor.hasColor()) {
204 202
             window.setNavigationBarColor(navigationBarColor.getColor());
205 203
         } else {