Hide Navigation bar for cordova app

前端 未结 2 460
野的像风
野的像风 2021-01-27 22:49

I want to hide navigation bar in my app cordova android app. I\'m using cordova navigation bar plugin but it hides navigation bar at index page, I want to hide navigation bar fr

相关标签:
2条回答
  • 2021-01-27 23:22

    The best way is to install this plugin.

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

    Installation:

    cordova plugin add cordova-custom-config 
    

    If using Cordova version => 6.2.0 use:

    cordova plugin add cordova-custom-config --fetch
    

    Then you can edit the Android theme by editing your config.xml

    <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.

    0 讨论(0)
  • 2021-01-27 23:31

    Just edit in Android Studio conifg.xml (app -> res -> xml -> config.xml), just add <preference name="Fullscreen" value="true" /> and run your app!

    0 讨论(0)
提交回复
热议问题