Play.gif Image In Android Without Using Webview
I tried like this, which i found on the net to play gif images: private class MYGIFView extends View { Movie movie; InputStream is = null; long moviestart; public
Solution 1:
Android cannot play GIF files without WebView
. You must break it apart into frames and animate it yourself.
I found on another StackOverflow post this bit of software from XoyoSoft, called GifSplitter, that can split a GIF into frames. You would then want to use AnimationDrawable
to combine those.
It would look something like this:
// Your files:
res\drawable-xxxx\frame1.jpg
res\drawable-xxxx\frame2.jpg
res\drawable-xxxx\frame3.jpg
// ...
res\drawable-xxxx\frame99.jpg
Then, there is an example in the AnimationDrawable
documentation above that will show how to display those images.
Lastly, you must load and play the animation; that, too, is detailed in the AnimationDrawable
documentation.
Post a Comment for "Play.gif Image In Android Without Using Webview"