Skip to content

Commit

Permalink
Added one more flag for Android status bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
greenfrvr committed Jan 17, 2020
1 parent 6acef10 commit 2753c68
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
import static android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
import static java.lang.annotation.RetentionPolicy.SOURCE;
Expand Down Expand Up @@ -96,7 +95,7 @@ private WritableMap convertToWindowInsetsMap(WindowInsetsCompat insets, int uiOp

private void applyStatusBarVisibility(WritableMap map, WindowInsetsCompat insets, int uiOptions, int windowOptions) {
boolean isStatusBarHidden = (windowOptions & FLAG_FULLSCREEN) != 0 || (uiOptions & SYSTEM_UI_FLAG_FULLSCREEN) != 0;
boolean isLayoutUnderStatusBar = (uiOptions & SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0;
boolean isLayoutUnderStatusBar = (uiOptions & SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0 || (windowOptions & FLAG_LAYOUT_IN_SCREEN) != 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
isLayoutUnderStatusBar = isLayoutUnderStatusBar || (windowOptions & FLAG_TRANSLUCENT_STATUS) != 0;
}
Expand Down

0 comments on commit 2753c68

Please sign in to comment.