public final class ImageData
extends <any>
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache()
Clears in-memory cache
|
android.graphics.Bitmap |
getBitmap()
Image bitmap, null if not loaded yet
|
android.graphics.Bitmap |
getData() |
boolean |
isUseCache()
Memory cache is disabled by default, bitmaps saves with strong link, but it is possible to
turn in on with
useCache(boolean) method |
static ImageData |
newImageData(java.lang.String url) |
static ImageData |
newImageData(java.lang.String url,
int width,
int height) |
void |
setBitmap(android.graphics.Bitmap bitmap) |
static void |
setCacheSize(int sizeInBytes)
Maximum in-memory cache size for images.
|
void |
setData(android.graphics.Bitmap data) |
java.lang.String |
toString() |
void |
useCache(boolean use)
By default, memory cache for images is disabled and bitmaps keeps by strong link.
|
@AnyThread public static void setCacheSize(int sizeInBytes)
sizeInBytes - cache size in bytes@AnyThread public static void clearCache()
@NonNull public static ImageData newImageData(@NonNull java.lang.String url)
@NonNull public static ImageData newImageData(@NonNull java.lang.String url, int width, int height)
public boolean isUseCache()
useCache(boolean) method@Nullable public android.graphics.Bitmap getBitmap()
public void setBitmap(@Nullable
android.graphics.Bitmap bitmap)
@Nullable public android.graphics.Bitmap getData()
public void setData(@Nullable
android.graphics.Bitmap data)
public void useCache(boolean use)
setCacheSize(int)use - should this ImageData use memory cache or not@NonNull public java.lang.String toString()