简体   繁体   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"/>

Only it is showing the white splash screen. 只有它显示白色的启动画面。 I do not know where I went wrong? 我不知道我哪里出了错? Someone help me to come out? 有人帮我出来吗?

Probably the value attribute. 可能是值属性。 The value is the name of the specific image file being used as the splash in the resource folder. 该值是用作资源文件夹中的启动文件的特定图像文件的名称。 Sometimes its not called 'screen' but 'splash'. 有时它不被称为“屏幕”而是“飞溅”。

To customize better you can also use resources in Ionic CLI http://ionicframework.com/docs/cli/icon-splashscreen.html 为了更好地自定义,您还可以使用Ionic CLI中的资源http://ionicframework.com/docs/cli/icon-splashscreen.html

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

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