Last active
April 1, 2021 18:24
-
-
Save kakha13/3c26f582b2b7ee8dfde3b70df545b1d0 to your computer and use it in GitHub Desktop.
Nativescript - Change android statusbar color 100% transparent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const View = android.view.View; | |
const window = Application.android.startActivity.getWindow(); | |
const decorView = window.getDecorView(); | |
window.clearFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | |
decorView.setSystemUiVisibility( | |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | | |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | | |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | | |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); | |
window.setStatusBarColor(0x000000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment