简体   繁体   English

隐藏cordova应用程序的导航栏

[英]Hide Navigation bar for cordova app

I want to hide navigation bar in my app cordova android app.我想在我的应用程序cordova android 应用程序中隐藏导航栏。 I'm using cordova navigation bar plugin but it hides navigation bar at index page, I want to hide navigation bar from splash screen ie created by using splash screen plugin.我正在使用cordova 导航栏插件,但它在索引页隐藏了导航栏,我想从闪屏中隐藏导航栏,即使用闪屏插件创建的。

Kindly suggest请建议

Thanks in advance提前致谢

只需在 Android Studio conifg.xml (app -> res -> xml -> config.xml) 中编辑,只需添加<preference name="Fullscreen" value="true" />并运行您的应用程序!

The best way is to install this plugin.最好的方法是安装这个插件。

https://www.npmjs.com/package/cordova-custom-config https://www.npmjs.com/package/cordova-custom-config

Installation:安装:

cordova plugin add cordova-custom-config 

If using Cordova version => 6.2.0 use:如果使用 Cordova 版本 => 6.2.0 使用:

cordova plugin add cordova-custom-config --fetch

Then you can edit the Android theme by editing your config.xml然后你可以通过编辑你的 config.xml 来编辑 Android 主题

<preference name="android-manifest/application/activity/@android:theme" value="@android:style/Theme.Light.NoTitleBar.Fullscreen"/>

This should hide the navigation bar and give you a full screen experience.这应该隐藏导航栏并为您提供全屏体验。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM