|
static BitmapCache | initialize (Resources resources, String id, boolean alwaysPurge) |
|
static BitmapCache | initialize (Resources resources, int maxWidth, int maxHeight, String id, boolean alwaysPurge) |
|
static BitmapCache | initialize (Resources resources, int maxWidth, int maxHeight, int cacheSize, String id, boolean alwaysPurge) |
|
static int | calculateInSampleSize (BitmapFactory.Options options, int reqWidth, int reqHeight) |
|
static String | generateUri (int res) |
| Generate the the String URI according to the res id. More...
|
|
static String | normalizeURI (int res) |
| Normalize the resource int to a valid URI for the BitmapCache. More...
|
|
|
static final int | IMAGE_NOT_LOADED = 0 |
|
static final int | IMAGE_LOADED = 1 |
|
static final int | IMAGE_IN_PROGRESS = 2 |
|
static final int | ERROR_LOADING_IMAGE = 3 |
|
static final int | DEFAULT_CACHE_SIZE = 6 * 1024 * 1024 |
| Default cache size. More...
|
|
static final int | DEFAULT_TIME_OUT = 30000 |
|
static final int | DEFAULT_MAX_WIDTH = 256 |
|
static final int | DEFAULT_MAX_HEIGHT = 256 |
|
static final String | HEADER_HTTP = "http://" |
|
static final String | HEADER_HTTPS = "https://" |
|
static final String | HEADER_FILE = "file://" |
|
static final String | HEADER_FILE_ = "/" |
|
static final String | HEADER_RESOURCE = "res://" |
|
static final String | HEADER_ASSETS = "assets://" |
|
Add a listener for when a bitmap that is not stored locally needs to be loaded.
- Parameters
-
int com.beyondar.android.util.cache.BitmapCache.cleanRecylcedBitmaps |
( |
| ) |
|
Clean the recycled Bitmaps stored in the cache.
- Returns
- Return the number of recycled imaged founded in the cache.
static String com.beyondar.android.util.cache.BitmapCache.generateUri |
( |
int |
res | ) |
|
|
static |
Generate the the String URI according to the res id.
- Parameters
-
- Returns
- The String that represents the image
Bitmap com.beyondar.android.util.cache.BitmapCache.getBitmap |
( |
int |
id | ) |
|
Get the image from the resources.
- Parameters
-
id | The resource id to load |
- Returns
- The bitmap if the image is already loaded, null otherwise
Bitmap com.beyondar.android.util.cache.BitmapCache.getBitmap |
( |
String |
uri | ) |
|
Get the Bitmap according to the uri.
If it is not loaded, it try to load first.
- Parameters
-
- Returns
static String com.beyondar.android.util.cache.BitmapCache.normalizeURI |
( |
int |
res | ) |
|
|
static |
Normalize the resource int to a valid URI for the BitmapCache.
- Parameters
-
- Returns
- The res as a normalized URI ready to be used.
Remove the listener.
- Parameters
-
- Returns
Bitmap com.beyondar.android.util.cache.BitmapCache.storeBitmap |
( |
String |
uri, |
|
|
Bitmap |
btm |
|
) |
| |
Store a bitmap with the name of the URI.
- Parameters
-
- Returns
- The bitmap stored
final int com.beyondar.android.util.cache.BitmapCache.DEFAULT_CACHE_SIZE = 6 * 1024 * 1024 |
|
static |
The documentation for this class was generated from the following file:
- src/com/beyondar/android/util/cache/BitmapCache.java