本文介绍了闪屏与PhoneGap的生成显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我打开我的应用程序是不显示启动画面我已经设置。这里是我的 config.xml中
文件:
When I load my application is does not display the splash screen I have set. Here is my config.xml
file:
<?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.Mobile.test"
versionCode=""
version = "1.0">
<name>Mobile</name>
<description>
</description>
<author href="www.mobile.net" email="[email protected]">
SMD
</author>
<preference name="phonegap-version" value="3.1.0" />
<preference name="orientation" value="default" />
<preference name="fullscreen" value="false" />
<preference name="target-device" value="universal" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="true" />
<preference name="ios-statusbarstyle" value="default" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="EnableViewportScale" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="HideKeyboardFormAccessoryBar" value="false" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="internalOnly" />
<preference name="SplashScreenDelay" value="5000" />
<preference name="ErrorUrl" value=""/>
<preference name="BackgroundColor" value="0x000000"/>
<preference name="KeepRunning" value="true"/>
<preference name="DisallowOverscroll" value="false"/>
<preference name="LoadingDialog" value=","/>
<preference name="LoadUrlTimeoutValue" value="20000" />
<preference name="disable-cursor" value="false" />
<gap:platform name="android" />
<gap:plugin name="org.apache.cordova.geolocation" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:splash src="img/splash/android/ldpi.png" gap:platform="android" gap:density="ldpi" />
<gap:splash src="img/splash/android/mdpi.png" gap:platform="android" gap:density="mdpi" />
<gap:splash src="img/splash/android/hdpi.png" gap:platform="android" gap:density="hdpi" />
</widget>
我也尝试:
<gap:splash src="splash.png" />
与名为扑通一声,并在根文件夹没有运气中的index.html闪屏
with the splash screen titled "splash" and in the root folder with the index.html with no luck
该闪屏的尺寸为:
LDPI:
Portrait: 200x320px
Landscape: 320x200px
MDPI:
Portrait: 320x480px
Landscape: 480x320px
HDPI:
Portrait: 480x800px
Landscape: 800x480px
有人能提出建议,就如何解决这个问题?我不是在本地包装这个应用程序,严格使用的电话峡构建。
推荐答案
我比较有些项目对我来说,我实现了闪屏在将其与 config.xml中
我发现你缺少这一行:
I compare some project for me , i implemented Splash screen in it with your config.xml
i found you missing this line :
<preference name="splash-screen-duration" value="6000" />
和这个插件
<plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
试试这个和饲料我回
try this and feed me back
这篇关于闪屏与PhoneGap的生成显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!