Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

run Animated GIF image in WebView on Andorid

Hi guys,
If anyone knows how to run animated image(.gif) file in webview then please post the solution on android…

Here below i put the sample code that i have used :

var win = Ti.UI.currentWindow;
var htmlstrng='<html><body background="images/display_rhythm.png"><img src="images/New_Loop.gif"/></body></html>';

var disp_rythm_imageView = Titanium.UI.createWebView({
top:10,
left:0,
height:116,
width:320,
html:htmlstrng
});
win.add(disp_rythm_imageView);

But this works fine on Iphone but on android the animation dosen'r run….
Please help..
Awaited for your Quick Responses…

— asked August 3rd 2010 by Sandil Shah
  • android
  • animated
  • image
0 Comments

2 Answers

  • Same behavior here.
    Android 1.6 HTC Magic Browser - webview does not animate.

    Any new idea.

    If there would be a library to decompose gifs on a server (with php, java etc.) I could split up the gif into phase-images and display with ImageView in
    a loop.

    But it would be better if Appcelerator would support Animated GIFs..

    Werner

    — answered November 2nd 2010 by Werner Bogula
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.