public class AsyncDecodeResMeasured
extends android.os.AsyncTask<java.lang.Void,java.lang.Void,android.graphics.Bitmap>
| Constructor and Description |
|---|
AsyncDecodeResMeasured(android.content.res.Resources res,
int resId,
int reqWidth,
int reqHeight,
OnBitmapRendered onBitmapRendered)
Basic constructor with just the required parameters.
|
AsyncDecodeResMeasured(android.content.res.Resources res,
int resId,
int reqWidth,
int reqHeight,
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 void |
onPostExecute(android.graphics.Bitmap bitmap) |
public AsyncDecodeResMeasured(android.content.res.Resources res,
int resId,
int reqWidth,
int reqHeight,
OnBitmapRendered onBitmapRendered,
OnBitmapRenderFailed onBitmapRenderFailed,
EpicBitmapCache epicBitmapCache)
res - Resources package. You can get default resources package using ContextThemeWrapper.getResources() inside an activity or Context.getResources() outside if a Context is available.resId - App resource id. Could be either the pure integer value, or the Android resource name (R.drawable.img_name).reqWidth - Required width of the view where the Bitmap should fit. This parameter doesn't affect image aspect ratio, it's only used to calculate the inSampleSize of the image in case a downsample is required.reqHeight - Required height of the view where the Bitmap should fit. This parameter doesn't affect image aspect ratio, it's only used to calculate the inSampleSize of the image in case a downsample is required.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 AsyncDecodeResMeasured(android.content.res.Resources res,
int resId,
int reqWidth,
int reqHeight,
OnBitmapRendered onBitmapRendered)
res - Resources package. You can get default resources package using ContextThemeWrapper.getResources() inside an activity or Context.getResources() outside if a Context is available.resId - App resource id. Could be either the pure integer value, or the Android resource name (R.drawable.img_name).reqWidth - Required width of the view where the Bitmap should fit. This parameter doesn't affect image aspect ratio, it's only used to calculate the inSampleSize of the image in case a downsample is required.reqHeight - Required height of the view where the Bitmap should fit. This parameter doesn't affect image aspect ratio, it's only used to calculate the inSampleSize of the image in case a downsample is required.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>