Animated GIF images rendered by Android's WebView do not seem to animate. Has anyone figured out how to make them work? I'm testing on an N1 with 2.1-u1. None of the web settings available seem applicable.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Use WebP format for Android.
https://developers.google.com/speed/webp/
There are several online utilities available, to convert animated GIFs to WebP format (http://www.zamzar.com/convert/gif-to-webp/ is one example).
Note that WebP is not supported on most of the other browsers so you may need to apply some logic to select GIF or WebP based on platform.
Animated GIFs are supported in Froyo (Android 2.2).
Not supported YET. Read more about this here: http://code.google.com/p/android/issues/detail?id=3422
As a workaround, if you are using a custom WebView, you can do these 2 things together:
Enable Javascript for the Webview (Eg: https://github.com/LatinSuD/slidetypekeyboard/blob/master/src/com/latinsud/android/slidetypekeyboard/HelpActivity.java) Like: myWebView.getSettings().setJavaScriptEnabled(true);
Then use javascript to swap images (Eg: https://github.com/LatinSuD/slidetypekeyboard/blob/master/assets/index.html)
Please note that this is not a solution for displaying GIFs, you must modify the content of the web, and convert/split GIF animations into different files (one for each frame) in any format (JPG, PNG, etc).
AFAIK, animated GIFs are not supported on Android except as movie clips played by
MediaPlayer
.