2017-01-15 43 views
0

我想定製我的cordova項目的啓動畫面。 以下是config.xml文件中插入我的代碼更改開機畫面爲android平臺定製cordova Splash Screen

<preference name = "SplashScreen" value = "screen" /> 
<preference name = "SplashScreenDelay" value = "3000" /> 
<preference name = "SplashMaintainAspectRatio" value = "true" /> 
<splash src="/HelloworldProject/splashimages/splash.png"platform="android" width="720" height="1280" /> 

我看不出有什麼變化,當我跑這裏我app.Any幫助?

回答

0

嘗試這些建議了:

  1. 看起來應該有platform前的空間。
  2. SplashScreen首選項應具有該src文件的值;不screen

嘗試了這一點特別(cordova apache docs模仿):

<preference name="SplashScreen" value="/HelloworldProject/splashimages/splash.png" /> <!-- defaults to "/img/logo.png" --> 
<preference name="SplashScreenDelay" value="3000" /> <!-- defaults to "3000" --> 
<preference name = "SplashMaintainAspectRatio" value = "true" /> 
<splash src="/HelloworldProject/splashimages/splash.png" width="720" height="1280" /> 

如果你願意,你可以把splash標籤的platform標籤內的name="android"

<platform name="android"> 
     <splash density="land-ldpi" src="/HelloworldProject/splashimages/splash.png" /> 
</platform> 
相關問題