I am making an Android application, in which I want to play a GIF file in an imageview. I have a tried a lot of ways, made a custom class but haven\'t succeeded.
Has an
You can display Gif in android without using any 3rd party libraries. This is how I did that.
Take a web view.
Most of the examples shows how to open a file from asset folder, but here I show you how to open it from a SD Card/memory.
WebView webView = (WebView) findViewById(R.id.imageWebView);
String data = " ";
// 'filePath' is the path of your .GIF file on SD card.
webView.loadDataWithBaseURL("file:///android_asset/",data,"text/html","UTF-8",null);