瀏覽代碼

Fix navigationBarColor in modals

closes #1694
Guy Carmeli 7 年之前
父節點
當前提交
fc2a637235
共有 1 個檔案被更改,包括 1 行新增3 行删除
  1. 1
    3
      android/app/src/main/java/com/reactnativenavigation/screens/Screen.java

+ 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 {