在phonegap构建中,如何删除在应用程序启动时显示一秒钟左右的标题栏?我尝试了全屏,如Phonegap remove title bar at start和它的工作情况所示,应用程序是全屏的,但标题栏在应用程序开始时显示了大约一秒钟。在本地构建时,我可以使用命令android:theme="@android:style/Theme.NoTitleBar">删除标题栏表单manifest.xml
如何从phonegap build中完全删除标题栏?
我通过将以下几行添加到config.xml中解决了这个问题
<gap:config-file platform="android" parent="/manifest">
<supports-screens
android:xlargeScreens="false"
android:largeScreens="false"
android:smallScreens="false" />
<application android:theme="@android:style/Theme.NoTitleBar" >
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" ></activity>
</application>
</gap:config-file>发布于 2014-06-18 20:58:56
Alex已经在第一篇文章中提供了解决方案。我只想澄清两件事:
supports-screens的属性改回了true所以这将是你的config.xml:
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"xmlns:android = "http://schemas.android.com/apk/res/android"
id = "com.domain.app"
version = "1.0.0">
...
<gap:config-file platform="android" parent="/manifest">
<supports-screens
android:xlargeScreens="true"
android:largeScreens="true"
android:smallScreens="true" />
<application android:theme="@android:style/Theme.NoTitleBar" >
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
</application>
</gap:config-file>
</widget>向wildabeast on github致敬。
发布于 2014-09-13 04:14:27
我使用了robro的代码,它工作了,但我屏幕上的所有东西都在顶部被切断了,因为我在配置中使用了这个设置来允许状态栏:
<preference name="fullscreen" value="false" />然后,我拿出了以下内容:
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" ></activity>现在一切看起来都很完美。
发布于 2014-02-28 06:34:23
尝试添加闪屏(如果你还没有)我试过了,你再也看不到标题栏了。
你的config.xml需要这些安卓系统:
<icon src="icons/android/ldpi.png" gap:platform="android" gap:density="ldpi" />
<icon src="icons/android/mdpi.png" gap:platform="android" gap:density="mdpi" />
<icon src="icons/android/hdpi.png" gap:platform="android" gap:density="hdpi" />
<icon src="icons/android/xhdpi.png" gap:platform="android" gap:density="xhdpi" />然后将您的图像添加到src。
https://stackoverflow.com/questions/21884095
复制相似问题