nativescript

StatusBar

Hide/show - android

This is a statusbar that you see on top of your screen with icons of battry,clock … . enter image description here

let frame = require("ui/frame");

Hide:

frame.topmost().android.activity.getWindow().
getDecorView().setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_FULLSCREEN);

Show:

frame.topmost().android.activity.getWindow().
getDecorView().setSystemUiVisibility(android.view.View.SYSTEM_UI_FLAG_VISIBLE );

Make statusBar Transparent android

open APP_Resources/values/styles.xml and add the

<item name="android:windowTranslucentStatus">true</item>

in the

<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar"> </style> 

section.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow