GifLoader
adhishlal
35
Visit GitHub RepoGIF

Image

Android GIF Viewer/Loader

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:

Installing

  1. Add it in your root build.gradle at the end of repositories:
	allprojects {
		repositories {
			...
			maven { url 'https://www.jitpack.io' }
		}
	}
  1. Step 2. Add the dependency
	dependencies {
	        compile 'com.github.adhishlal:gifloader:1.1'
	}

Next, go to your XML file wherever you want to show the GIF file along with the animation and add the following widget

        <lal.adhish.gifprogressbar.GifView
            android:id="@+id/progressBar"
            android:layout_width="@dimen/_50dp"
            android:layout_centerInParent="true"
            android:layout_margin="@dimen/_5sdp"
            android:layout_height="@dimen/_50dp"
            android:layout_gravity="center" />

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);
pGif.setImageResource(R.drawable.loader);

Bravo! You just did it.

Just compile and run your code.????

Show Some ❤️

GitHub stars GitHub forks GitHub watchers GitHub followers Twitter Follow

Liked the work? [Buy me a cup of coffee] (https://www.paypal.me/AdhishLal) ☕️

Become a better Android Developer
Millions of developers are learning at MindOrks

Online Training Program

Featured Blogs

Our Team

MindOrks is Certainly one of the best online blog to stay on top of all the Android development news, coding and design patterns. Finally a blog I can count on to keep myself updated with latest and greatest things happening in Android world.

Vipul Shah
Android Developer
Microsoft

Become Pro in Android by watching videos

OUR LEARNERS WORK AT