繁体   English   中英

如何在离子Cordova中添加启动画面?

[英]How to add Splash screen in ionic cordova?

I have installed plug-in for splash screen, 

$ ionic start myapp tabs
$ ionic plugin add org.apache.cordova.splashscreen
$ ionic platform add android
$ vi config.xml

Changed config file as the following

Put the following preference elements in config.xml:

<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="1000" />

In the <platform name="android">, put the <splash> elements in, but DO NOT include the file extension:

<splash src="res/screen/android/640x960" density="mdpi"/>
<splash src="res/screen/android/768x1024" density="hdpi"/>
<splash src="res/screen/android/1536x2048" density="xhdpi"/>

只有它显示白色的启动画面。 我不知道我哪里出了错? 有人帮我出来吗?

可能是值属性。 该值是用作资源文件夹中的启动文件的特定图像文件的名称。 有时它不被称为“屏幕”而是“飞溅”。

为了更好地自定义,您还可以使用Ionic CLI中的资源http://ionicframework.com/docs/cli/icon-splashscreen.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM