为什么 .gif 动画图像在我的 Android 应用程序中没有动画?
我正在尝试在我的应用程序中使用 .gif 动画图像,但该图像没有动画。在 iPhone 上它可以工作...为什么 Android 会阻止动画?有什么解决办法吗?
I'm trying to use .gif animated images in my app, but the image is not animating. On an iPhone it works... why is Android blocking the animation? Any solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来很多人都希望 GIF 动画只能在 Android 上运行,但目前还不能 - 请参阅 Android 错误跟踪器上的问题 3422。
看来您可以根据 http://androidosbeginning.blogspot.com/2010/09/gif-animation-in-android.html
类似的问题,有一个可能有帮助的答案你: Android:如何显示给定 url 的大动画 gif?
It looks like plenty of people are wanting animated GIFs to just work on Android, but they don't currently - see Issue 3422 on the Android bug tracker.
It looks like you may be able to do it by treating the animated GIF as a movie according to http://androidosbeginning.blogspot.com/2010/09/gif-animation-in-android.html
Similar question, which has an answer which may help you: Android: How do a display a large animated gif given a url?
你可以这样做,
这是示例代码。
GIFDemo1.java
GraphicsActivity.java
PictureLayout.java
希望这对您有帮助。
它不适用于非常复杂的 gif。
you can do it like this
here is sample code.
GIFDemo1.java
GraphicsActivity.java
PictureLayout.java
hope this help you.
it not work for very complex gif.