public abstract class Decoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Decoder.SOURCE |
Modifier and Type | Field and Description |
---|---|
protected int |
resourceId |
protected Decoder.SOURCE |
sourceType |
Constructor and Description |
---|
Decoder(android.content.res.Resources resources,
int resourceId) |
Decoder(android.content.res.Resources resources,
android.net.Uri uri) |
Modifier and Type | Method and Description |
---|---|
void |
createCache() |
protected abstract ImageSize |
decodeSize() |
protected static android.graphics.Bitmap |
fallbackCrop(android.graphics.Bitmap bitmap,
android.graphics.RectF slice,
int sampleSize) |
protected void |
finalize() |
abstract android.graphics.Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds,
DrawableState state) |
abstract android.graphics.Bitmap |
getBitmap(android.graphics.RectF bounds,
android.graphics.RectF region) |
abstract android.graphics.drawable.Drawable |
getDrawable() |
java.io.InputStream |
getInputStream() |
protected static java.io.InputStream |
getInputStream(android.net.Uri uri) |
java.lang.String |
getPath() |
protected android.content.res.Resources |
getResources() |
ImageSize |
getSize() |
android.net.Uri |
getUri() |
boolean |
isStateful() |
abstract boolean |
isVector() |
void |
recycle() |
static android.net.Uri |
resourceToUri(android.content.res.Resources resources,
int resID) |
@DrawableRes protected int resourceId
protected final Decoder.SOURCE sourceType
public Decoder(@NonNull android.content.res.Resources resources, @DrawableRes @RawRes int resourceId)
public Decoder(@NonNull android.content.res.Resources resources, @NonNull android.net.Uri uri)
@WorkerThread public void createCache()
@NonNull protected abstract ImageSize decodeSize()
protected static android.graphics.Bitmap fallbackCrop(android.graphics.Bitmap bitmap, android.graphics.RectF slice, int sampleSize)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
@Nullable @WorkerThread public abstract android.graphics.Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds, @Nullable DrawableState state)
@Nullable @WorkerThread public abstract android.graphics.Bitmap getBitmap(@NonNull android.graphics.RectF bounds, @NonNull android.graphics.RectF region)
@WorkerThread public abstract android.graphics.drawable.Drawable getDrawable()
@WorkerThread public java.io.InputStream getInputStream() throws java.io.FileNotFoundException
java.io.FileNotFoundException
@WorkerThread protected static java.io.InputStream getInputStream(android.net.Uri uri) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.lang.String getPath()
protected android.content.res.Resources getResources()
@NonNull public final ImageSize getSize()
@NonNull public android.net.Uri getUri()
public boolean isStateful()
public abstract boolean isVector()
public void recycle()
@AnyThread public static android.net.Uri resourceToUri(android.content.res.Resources resources, int resID)