build.phonegap添加闪屏 [英] build.phonegap adding splash screens

查看:134
本文介绍了build.phonegap添加闪屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ionic框架和build.phonegap来为Android和IOS构建应用程序,并在向应用程序添加启动屏幕的过程中遇到一些麻烦。

I'm using the Ionic framework and build.phonegap to build an application for Android and IOS and having a bit of trouble with the process of adding splash screens to the application.

有很多教程创建启动屏幕后运行离子生成android或cordova生成android,然后添加闪屏,但我想使用只有www文件夹里面的离子和推它通过phonegap构建。

There are quite a few tutorials to create splash screens after running "ionic build android" or "cordova build android" and then adding the splash screens, but I would like to use ONLY the www folder inside of ionic and push it through phonegap build.

有没有办法/目录,我可以添加启动屏幕图像并通过config.xml引用它们?然后将整个www文件夹上传到build.phonegap。

Is there a way / directory I can add the splash screen images to and reference them through config.xml? Then upload the whole www folder to build.phonegap.

一些指导将不胜感激。

推荐答案

使用Phonegap Build,只要你在config.xml中引用它们,你就可以把splash screen放在你想要的任何地方。

With Phonegap Build, you can put the splash screens pretty much anywhere you want, as long as you reference them in the config.xml.

例如,对于Android:

For example, with Android:

<gap:splash src="splash.png" />
<gap:splash src="images/splash/splash-portrait-320x480.png" gap:platform="android" gap:density="ldpi" />
<gap:splash src="images/splash/splash-portrait-640x960.png" gap:platform="android" gap:density="mdpi" />
<gap:splash src="images/splash/splash-portrait-640x1136.png" gap:platform="android" gap:density="hdpi" />
<gap:splash src="images/splash/splash-portrait-1536x2008.png" gap:platform="android" gap:density="xhdpi" />
<gap:splash src="images/splash/splash-portrait-1536x2008.png" gap:platform="android" gap:density="xxhdpi" />

请注意,你必须有一个默认的splash.png,它必须在ROOT(WWW, config file is)。

Notice you must have a default splash.png and it MUST be in the ROOT (WWW, whereever your config file is).

另请参阅他们的文档: http://docs.build.phonegap.com/en_US/configuring_icons_and_splash.md.html#Icons%20and%20Splash%20Screens

See also their documentation: http://docs.build.phonegap.com/en_US/configuring_icons_and_splash.md.html#Icons%20and%20Splash%20Screens

这篇关于build.phonegap添加闪屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆