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