Monday, 26 August 2013

Set loading bitmap to spinner in progress dialog

Set loading bitmap to spinner in progress dialog

I used a tutorial that showed me how to load bitmaps in an async task and
set them to an imageview and in the tutorial before the bitmap is loaded
the imageview is set to black with this piece of code
static class DownloadedDrawable extends ColorDrawable {
private final WeakReference<DownloadImageTask> bitmapDownloaderTaskReference;
public DownloadedDrawable(DownloadImageTask bitmapDownloaderTask) {
super(Color.BLACK);
bitmapDownloaderTaskReference =
new WeakReference<DownloadImageTask>(bitmapDownloaderTask);
}
public DownloadImageTask getBitmapDownloaderTask() {
return bitmapDownloaderTaskReference.get();
}
}
How can I change the imageview so that before it is loaded it is the
spinner in the progress dialog.
Thanks in advance.

No comments:

Post a Comment