I'm using Nativescript 7 and I'm trying to hide the status bar on android (The one with the clock, battery, etc... not the action bar).
So far I've found answers that seem to make it translucent. I'm not interested in making it translucent as I'd like for it to disappear completely when the app loads.
At the moment I've used things like:
page.backgroundSpanUnderStatusBar = true;
But it simply makes the page content flow underneath the status bar (obviously).
Are there any ways to do this without a plugin? If so, any code samples would be appreciated.
Why you don't want to use a plugin? You can try native-status-bar
import * as statusBar from 'nativescript-status-bar'
statusBar.hide();
You can search for something similar, e.g. nativescript-plugin-statusbar
this.statusbar.hideStaturbar()
If you need a solution without a plugin you can try to use fullscreen flag:
const application = require('application').android
const activity = application.startActivity
const win = activity.getWindow()
win.addFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN)