[英]Customize cordova Splash Screen for android platform
我想自定義我的科爾多瓦項目的啟動畫面。 這是我在config.xml文件中插入的代碼,用於更改初始屏幕
<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" />
運行我的應用程序時看不到任何更改。這里有幫助嗎?
嘗試以下建議:
platform
前應該有一個空間。 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
標記放在具有name="android"
的platform
標記內:
<platform name="android">
<splash density="land-ldpi" src="/HelloworldProject/splashimages/splash.png" />
</platform>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.