2013-06-21 24 views
3
config.xml中全屏偏好

我按照此页面上的非常明确的指示: https://build.phonegap.com/docs/config-xml的PhoneGap构建版本2.7.0忽略在Android

我已经包含在我的config.xml文件中的以下行(这是确实位于我的应用程序的顶层): <preference name="fullscreen" value="true" />

但屏幕顶部的状态栏仍然存在。

这里是我的全config.xml文件,如果有帮助..

<?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="[email protected]"> 
    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> 

任何帮助表示感谢,谢谢!

+0

我也注意到PGB忽略了许多文档化的偏好。很想看到解决这个问题的答案! – jakeonrails

+0

您正在使用哪个Phonegap版本以及您测试的是哪个Android版本? – Rahnzo

回答

0

只要将您​​3210文件,修改你的需要,在同一目录中,作为index.html文件:

enter image description here

注:在这种情况下,我们有我们的应用程序内置在public/ DIR。所以所有的样式表和JavaScript都已经被编译并放入一个。

现在只是观察魔术!

+1

它不适合我 – Rahnzo

0

在此路径中添加<preference name="fullscreen" value="true" />: res/xml/config.xml。

它真的对我很有用