Loading GIF files with animations have always been a challenge when we code for Android devices. Seeing this problem by most of the Android Developers across the globe, I thought of publishing a GIF loader library.
Now to load the GIF images into your Android Application, all you need to do is add a dependency to your app level gradle.build along with the jitpack configuration:
Now once this is done add a compile dependency in app level build.gradle
Next, go to your XML file wherever you want to show the GIF file along with the animation and add the following widget
Once this is done, open your Java class where you are inflating the above widget’s layout and initialise this as shown below and also set the GIF image resource which you want to show:
GifView pGif = (GifView) findViewById(R.id.progressBar);
Bravo! You just did it.
Just compile and run your code.