how to bind gif Image Inside a Web View.

Dear All,
I have one Gif Image inside a drawable folder and we want to add gif image inside a webview how to achieve this please suggest.

Best Answer

Answers

  • robbitrobbit CNMember Xamurai

    Krayem's answer is good , and I want to add something. In the OnDestory() method ,add the code will be better(webview may make memory leak):

    mv.loadUrl("about:blank");
    
    mv.stopLoading();
    
    mv= null;
    
  • KokulJoseKokulJose INMember ✭✭

    File "loading.gif" is at Assets folder of Android Project

    WebView webView=new WebView{
    Source = new HtmlWebViewSource
    {
    Html = $"<body\">image"
    }
    };
    Content = webView;
    
Sign In or Register to comment.