1

Gif doesn't work with my library :

implementation 'com.github.Cutta:GifView:1.1'

repositories {
maven {
    url "https://jitpack.io"
}

My layout

 <com.cunoraz.gifview.library.GifView
    android:id="@+id/gif1"
    android:layout_width="212dp"
    android:layout_height="132dp"
    app:gif="@drawable/tst1" />

My apk stopped and didn't show anything.

Paolo Colombo
  • 219
  • 5
  • 24
benlyazid
  • 92
  • 1
  • 8

1 Answers1

0

Try this solution:

In your gradle add

implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.5'

In your layout add

<pl.droidsonroids.gif.GifImageView
    android:id="@+id/gif"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/abc_list_selector_holo_dark"
    />

Finally, in your activity add

import pl.droidsonroids.gif.GifImageView;
...

GifImageView gifImageView = (GifImageView) findViewById(R.id.gif);
gifImageView.setImageResource(R.drawable.giphy);
Paolo Colombo
  • 219
  • 5
  • 24