问题描述
我试图为我的phonegap应用设置启动屏幕图像,当我设置静态图像(例如png)时,一切都进行得很好.现在,我需要在启动屏幕上加载动画,然后尝试设置gif图像而不是静态图像.但是,这样做之后,我将无法再启动我的应用程序.
I tried to set a splash-screen image for my phonegap app.When I set a static image such as png, everything goes well. Now I need a loading animation on my splash screen and I try to set a gif image instead of static image. However, after I do that I can not start my app any more.
可以将phonegap初始屏幕设置为gif图像吗?
Can phonegap splash-screen be set as gif image?
推荐答案
Cordova/PhoneGap并非开箱即用.
This isn't something Cordova/PhoneGap supports out of the box.
但是,如果您愿意使用Java/ObjC,则可以采用以下几种方法:
But if you're willing to dive in to Java/ObjC here are some possible approaches:
- You could make a custom plugin for which everplatform you are targeting that could do your animations for you. Examples here and here.
- Different from the previous approach you could make a custom plugin that loads another webview with the GIF image in that.
这两个建议都需要一个自定义插件,或者至少修改一个现有插件.
Both of these suggestions require a custom plugin or at the very least modifying an existing one.
这篇关于Phonegap初始屏幕可以显示gif图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!