Package 

Class GifDrawable

  • All Implemented Interfaces:
    android.graphics.drawable.Animatable , androidx.vectordrawable.graphics.drawable.Animatable2Compat , java.lang.Runnable

    
    public final class GifDrawable
    extends Drawable implements Animatable2Compat, Runnable
                        

    A drawable that can be used to display a static or animated GIF.

    Usage:

    val inputStream:InputStream = (...)
    
    val gifDrawable = GifDrawable.from(inputStream)

    By default, the drawable will respect the loop count of the decoded GIF. You can force your loop count by doing

    gifDrawable.loopCount = LoopCount.INFINITE