1package com.bumptech.glide.load.resource.drawable;
2
3import android.graphics.drawable.Animatable;
4import android.graphics.drawable.Drawable;
5
6/**
7 * A base class for drawables that are either static equivalents of {@link android.graphics.drawable.BitmapDrawable} or
8 * that contain an animation.
9 */
10public abstract class GlideDrawable extends Drawable implements Animatable {
11    /** A constant indicating that an animated drawable should loop continuously. */
12    public static final int LOOP_FOREVER = -1;
13    /**
14     * A constant indicating that an animated drawable should loop for its default number of times. For animated GIFs,
15     * this constant indicates the GIF should use the netscape loop count if present.
16     */
17    public static final int LOOP_INTRINSIC = 0;
18
19    /**
20     * Returns {@code true} if this drawable is animated.
21     */
22    public abstract boolean isAnimated();
23
24    /**
25     * Sets the number of times the animation should loop. This method will only have an affect if
26     * {@link #isAnimated ()}}  returns {@code true}. A loop count of <=0 indicates loop forever.
27     */
28    public abstract void setLoopCount(int loopCount);
29}
30