Skip to content

bitcores/BitmapAdapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

BitmapAdapter

An Android class for handling bitmap loading from file or network/Internet

Initialized with
initBitmapCache();
This is safe to be called multiple times, it will not destroy the cache if already initialized.

Bitmaps are called using a single method
getBitmap(String path, Integer type, Integer method, ImageView imageView, BitmapResponse response)
path: path to the file, filesystem path or url string
type: url or file request, TYPE_URL or TYPE_FILE
method: return the bitmap or set the bitmap to imageview, METHOD_GET or METHOD_SET
imageView: the imageview to set the bitmap to or null
response: the BitmapResponse callback or null

Set up a BitmapResponse callback like so
BitmapAdapter.BitmapResponse returnResponse = new BitmapAdapter.BitmapResponse() {
@Override
public void bitmapReturn(Bitmap bitmap) {
Log.i(TAG, "Bitmap return triggered");
}
};

bitmapAdapter.getBitmap(address, BitmapAdapter.TYPE_URL, BitmapAdapter.METHOD_GET, null, returnResponse);

About

An Android class for handling bitmap loading from file or network/Internet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages