import * as app from 'tns-core-modules/application'
import { device } from 'tns-core-modules/platform'
export function hideSystemUi () {
if (!app.android || parseInt(device.sdkVersion) < 21) { return }
const androidViewPkg = android.view // eslint-disable-line no-undef
const window = app.android.startActivity.getWindow()
window.addFlags(androidViewPkg.WindowManager.LayoutParams.FLAG_FULLSCREEN)
window.clearFlags(androidViewPkg.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN)
}
export function showSystemUi () {
if (!app.android || parseInt(device.sdkVersion) < 21) { return }
const androidViewPkg = android.view // eslint-disable-line no-undef
const window = app.android.startActivity.getWindow()
window.addFlags(androidViewPkg.WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN)
window.clearFlags(androidViewPkg.WindowManager.LayoutParams.FLAG_FULLSCREEN)
}
Build apps, not infrastructure.
Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)