|
@@ -8,6 +8,7 @@ import android.os.Bundle;
|
8
|
8
|
import android.support.v7.app.AppCompatActivity;
|
9
|
9
|
import android.view.View;
|
10
|
10
|
import android.view.Window;
|
|
11
|
+import android.view.WindowManager;
|
11
|
12
|
import android.widget.RelativeLayout;
|
12
|
13
|
|
13
|
14
|
import com.facebook.react.bridge.Callback;
|
|
@@ -105,6 +106,7 @@ public abstract class Screen extends RelativeLayout implements Subscriber {
|
105
|
106
|
|
106
|
107
|
public void setStyle() {
|
107
|
108
|
setStatusBarColor(styleParams.statusBarColor);
|
|
109
|
+ setStatusBarHidden(styleParams.statusBarHidden);
|
108
|
110
|
setStatusBarTextColorScheme(styleParams.statusBarTextColorScheme);
|
109
|
111
|
setNavigationBarColor(styleParams.navigationBarColor);
|
110
|
112
|
topBar.setStyle(styleParams);
|
|
@@ -175,6 +177,15 @@ public abstract class Screen extends RelativeLayout implements Subscriber {
|
175
|
177
|
}
|
176
|
178
|
}
|
177
|
179
|
|
|
180
|
+ private void setStatusBarHidden(boolean statusBarHidden) {
|
|
181
|
+ final Window window = ((NavigationActivity) activity).getScreenWindow();
|
|
182
|
+ if (statusBarHidden) {
|
|
183
|
+ window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
184
|
+ } else {
|
|
185
|
+ window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
186
|
+ }
|
|
187
|
+ }
|
|
188
|
+
|
178
|
189
|
@TargetApi(Build.VERSION_CODES.M)
|
179
|
190
|
private void setStatusBarTextColorScheme(StatusBarTextColorScheme textColorScheme) {
|
180
|
191
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return;
|