Phonegap初始屏幕可以显示gif图像吗? [英] Can phonegap splash-screen display gif image?

查看:80
本文介绍了Phonegap初始屏幕可以显示gif图像吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为我的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:

  • 您可以制作一个自定义插件 您定位的平台可以为您制作动画.示例此处此处.
  • 与以前的方法不同,您可以制作一个自定义插件,以使用GIF图像加载另一个Web视图.
  • You could make a custom plugin for which ever platform 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图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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