public static void StartNew(ImageView imageView, string url, Resources resources) { if (CancelPotentialWork(url, imageView)) { BitmapWorkerTask task = new BitmapWorkerTask(imageView, resources); AsyncDrawable asyncDrawable = new AsyncDrawable(resources, null, task); imageView.SetImageDrawable(asyncDrawable); task.Execute(url); } }
static BitmapWorkerTask getBitmapWorkerTask(ImageView imageView) { if (imageView != null) { Drawable drawable = imageView.Drawable; if (drawable is AsyncDrawable) { AsyncDrawable asyncDrawable = (AsyncDrawable)drawable; return(asyncDrawable.GetBitmapWorkerTask()); } } return(null); }