public class AsyncDecodeUrlForced
extends android.os.AsyncTask<java.lang.Void,java.lang.Void,android.graphics.Bitmap>
Constructor and Description |
---|
AsyncDecodeUrlForced(java.lang.String url,
int inSampleSize,
OnBitmapRendered onBitmapRendered)
Basic constructor with just the required parameters.
|
AsyncDecodeUrlForced(java.lang.String url,
int inSampleSize,
OnBitmapRendered onBitmapRendered,
OnBitmapRenderFailed onBitmapRenderFailed,
EpicBitmapCache epicBitmapCache)
All parameters constructor.
|
Modifier and Type | Method and Description |
---|---|
protected android.graphics.Bitmap |
doInBackground(java.lang.Void... params) |
protected java.io.InputStream |
getUrlConnectionInputStream(java.lang.String url)
Gets an
InputStream from a given Url |
protected void |
onPostExecute(android.graphics.Bitmap bitmap) |
public AsyncDecodeUrlForced(java.lang.String url, int inSampleSize, OnBitmapRendered onBitmapRendered, OnBitmapRenderFailed onBitmapRenderFailed, EpicBitmapCache epicBitmapCache)
url
- Image resource URL (e.g. http://www.website.com/image.png)inSampleSize
- Determines how many times image resolution is divided to lower memory usage. Image aspect ratio is not affected by this parameter, just its resolution / quality is lowered.onBitmapRendered
- Overwrite this callback to retrieve Bitmap
object rendered once it's ready and perform any other actions needed.onBitmapRenderFailed
- Overwrite this callback to perform actions when Bitmap
object fails to render. Can be null.epicBitmapCache
- Cache to check if bitmap has already been rendered.public AsyncDecodeUrlForced(java.lang.String url, int inSampleSize, OnBitmapRendered onBitmapRendered)
url
- Image resource URL (e.g. http://www.website.com/image.png)inSampleSize
- Determines how many times image resolution is divided to lower memory usage. Image aspect ratio is not affected by this parameter, just its resolution / quality is lowered.onBitmapRendered
- Overwrite this callback to retrieve Bitmap
object rendered once it's ready and perform any other actions needed.protected android.graphics.Bitmap doInBackground(java.lang.Void... params)
doInBackground
in class android.os.AsyncTask<java.lang.Void,java.lang.Void,android.graphics.Bitmap>
protected void onPostExecute(android.graphics.Bitmap bitmap)
onPostExecute
in class android.os.AsyncTask<java.lang.Void,java.lang.Void,android.graphics.Bitmap>
protected java.io.InputStream getUrlConnectionInputStream(java.lang.String url)
InputStream
from a given Urlurl
- Url from which InputStream should be obtainedInputStream
object connected to Url