Code example for ImageView

Methods: setImageBitmap, getTag

0
    } 
 
    @Override 
    protected void onPostExecute(Bitmap result) {
        if (result != null) {
            if (tag != null && tag.equals(imageView.getTag())) { // view 使いまわされ対策
                imageView.setImageBitmap(result);
Log.i("ImageDownloadTask", "done: " + tag);
++doneCount;
            } else { 
Log.w("ImageDownloadTask", "tag not match 2: " + tag);
            } 
        } else { 
            if (tag != null && tag.equals(imageView.getTag())) {
                imageDownloadHelper.onDownloadFailure(imageView);
            } 
        } 
        imageDownloadHelper.onDownloadSuccess(imageView);
--runningCount;
Log.w("ImageDownloadTask", "in: " + queueInCount + ", exec: " + executeCount + ", error: " + errorCount + ", cancel: " + cancelCount + ", done: " + doneCount + ", run: " + runningCount);
    } 
}