A simple android library to play with GIF
1 Add it in your root build.gradle at the end of repositories
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
2 Add the dependency
dependencies {
compile 'com.github.IsPra94:EasyGifView:1.0.1'
}
1 Add the JitPack repository to your build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
2 Add the dependency
<dependency>
<groupId>com.github.IsPra94</groupId>
<artifactId>EasyGifView</artifactId>
<version>1.0.1</version>
</dependency>
<com.medialablk.easygifview.EasyGifView
android:id="@+id/easyGifView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/dance" />
EasyGifView easyGifView = (EasyGifView) findViewById(R.id.easyGifView);
easyGifView.setGifFromResource(R.drawable.play); //Your own GIF file from Resources