msumaithri msumaithri - 1 year ago 100
Android Question

GIF Image display using WebView

Can someone please provide a code to display GIF images in a webview ( I'm already able to display the same using frame animation of png images) Now I want a way to display the GIF images rather than loading the frames or drawing the images again and again!

Answer Source

Gifs are supported in web view.

write a html file as following :

<body bgcolor="white">
    <table width="100%" height="100%">
            <td align="center" valign="center">
                <font color="gray">Some text you display</font>
                <img src="yourGIF.gif">

and store it in "assets" folder of you application also store your gif in the same folder. And do following to show it:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download