Resolved image display problems

This commit is contained in:
daniel oeh 2013-09-15 01:55:37 +02:00
parent 928bfa681f
commit 4d2275189e
4 changed files with 4 additions and 6 deletions

View File

@ -167,7 +167,6 @@ public class ExternalEpisodesListAdapter extends BaseExpandableListAdapter {
holder.lenSize.setVisibility(View.INVISIBLE); holder.lenSize.setVisibility(View.INVISIBLE);
} }
holder.feedImage.setTag(item.getImageLoaderCacheKey());
ImageLoader.getInstance().loadThumbnailBitmap( ImageLoader.getInstance().loadThumbnailBitmap(
item, item,
holder.feedImage, holder.feedImage,

View File

@ -120,7 +120,6 @@ public class FeedlistAdapter extends BaseAdapter {
} }
final String imageUrl = (feed.getImage() != null) ? feed.getImage() final String imageUrl = (feed.getImage() != null) ? feed.getImage()
.getFile_url() : null; .getFile_url() : null;
holder.image.setTag(imageUrl);
imageLoader.loadThumbnailBitmap( imageLoader.loadThumbnailBitmap(
feed.getImage(), feed.getImage(),
holder.image, holder.image,

View File

@ -50,8 +50,8 @@ public class BitmapDecodeWorkerTask extends Thread {
* before the bitmap was decoded * before the bitmap was decoded
*/ */
protected boolean tagsMatching(ImageView target) { protected boolean tagsMatching(ImageView target) {
return target.getTag(R.id.imageloader_key) == null Object tag = target.getTag(R.id.imageloader_key);
|| target.getTag(R.id.imageloader_key).equals(imageResource.getImageLoaderCacheKey()); return tag != null && tag.equals(imageResource.getImageLoaderCacheKey());
} }
protected void onPostExecute() { protected void onPostExecute() {

View File

@ -203,7 +203,7 @@ public class ImageDiskCache {
@Override @Override
protected void onImageLoaded(DiskCacheObject diskCacheObject) { protected void onImageLoaded(DiskCacheObject diskCacheObject) {
final Object tag = target.getTag(R.id.image_disk_cache_key); final Object tag = target.getTag(R.id.image_disk_cache_key);
if (tag != null || StringUtils.equals((String) tag, url)) { if (tag != null && StringUtils.equals((String) tag, url)) {
il.loadThumbnailBitmap(diskCacheObject.loadImage(), target, length); il.loadThumbnailBitmap(diskCacheObject.loadImage(), target, length);
} }
} }
@ -231,7 +231,7 @@ public class ImageDiskCache {
@Override @Override
protected void onImageLoaded(DiskCacheObject diskCacheObject) { protected void onImageLoaded(DiskCacheObject diskCacheObject) {
final Object tag = target.getTag(R.id.image_disk_cache_key); final Object tag = target.getTag(R.id.image_disk_cache_key);
if (tag != null || StringUtils.equals((String) tag, url)) { if (tag != null && StringUtils.equals((String) tag, url)) {
il.loadCoverBitmap(diskCacheObject.loadImage(), target, length); il.loadCoverBitmap(diskCacheObject.loadImage(), target, length);
} }
} }