How to play animated GIF image from url in android?

后端 未结 4 1106
梦谈多话
梦谈多话 2021-01-16 12:17

I am integrating giphy to my android app..

How can i play animated gif image from URL in android? Should I use ImageView, WebView, VideoView

4条回答
  •  旧巷少年郎
    2021-01-16 13:12

    Just create a html string and load that into android webview. Tested solution.

    http://developer.android.com/reference/android/webkit/WebView.html#loadData(java.lang.String, java.lang.String, java.lang.String)

     String x = "\"Smileyface\"";
    
     webView.loadData(x, "text/html", "utf-8");   
    

提交回复
热议问题