<preference name="ShowSplashScreenSpinner" value="false" /> <preference name="ScrollEnabled" value="false" /> <preference name="android-minSdkVersion" value="16" /> <preference name="BackupWebStorage" value="none" /> <preference name="ShowSplashScreen" value="true" /> <preference name="SplashScreen" value="screen" /> <preference name="SplashScreenDelay" value="3000" /> <preference name="AutoHideSplashScreen" value="false" /> <preference name="SplashShowOnlyFirstTime" value="false" /> <preference name="FadeSplashScreen" value="false" /> <feature name="SplashScreen"> <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" /> </feature>
上面的代码贴到config.xml里面
// 慢一秒在隐藏splashScreen 完美解决白屏问题 statusBar.styleDefault(); setTimeout(() => { splashScreen.hide(); }, 1000)
ShowSplashScreenSpinner——是否显示启动屏转圈圈那个 Spinner;
AutoHideSplashScreen——是否自动隐藏SplashScreen;
FadeSplashScreen——是否逐渐消失SplashScreen;
SplashScreenBackgroundColor——背景颜色;
SplashMaintainAspectRatio——如果值设置为 true,则图像将不会伸展到适合屏幕。如果设置为 false ,它将被拉伸;
FadeSplashScreenDuration——逐渐消失SplashScreen的动画时延;
SplashShowOnlyFirstTime——是否只第一次显示;
SplashScreen——它是 platform / android / res / drawable - 文件夹中的图像的名称。Cordova默认生成 screen.png 图片;
SplashScreenDelay——SplashScreen显示的延时时间