PhoneGap Build version 2.7.0 ignoring fullscreen preference in config.xml on Android

一曲冷凌霜 提交于 2019-12-10 10:13:44

问题


I have followed the very clear instructions on this page: https://build.phonegap.com/docs/config-xml

I have included the following line in my config.xml file (which is indeed located at the top level of my app): <preference name="fullscreen" value="true" />

And yet the status bar at the top of the screen remains.

Here is my full config.xml file if it helps..

<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
    xmlns:gap = "http://phonegap.com/ns/1.0"
    id        = "com.universeprojects.voidspace"
    versionCode="10" 
    version   = "0.1.2b">

<!-- versionCode is optional and Android only -->

<name>VoidSpace - DevServer</name>

<description>
    This is a special version of VoidSpace that connects to the development server.
</description>

<author href="https://voidspace.ca" email="support@universeprojects.com">
    Nikolas Gauvreau
</author>

<preference name="EnableViewportScale" value="true" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />

<icon src="icon.png" />
<gap:splash src="splash.png" />
</widget>

Any help is appreciated, thanks!


回答1:


Just place your config.xml file, modified as you need, at the same directory, as the index.html file:

Note: in this case, we have our application built in the public/ dir. So all the stylesheets and javascripts are already compiled and placed within one.

And now just observe the magic!




回答2:


Add <preference name="fullscreen" value="true" /> in this path: res/xml/config.xml.

It really worked for me



来源:https://stackoverflow.com/questions/17236935/phonegap-build-version-2-7-0-ignoring-fullscreen-preference-in-config-xml-on-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!