Added timeouts for last.fm data loading

This commit is contained in:
Karim Abou Zeid 2015-08-29 14:53:00 +02:00
commit 783332c3af
2 changed files with 6 additions and 7 deletions

View file

@ -123,15 +123,10 @@ public class ArtistAdapter extends AbsMultiSelectAdapter<ArtistAdapter.ViewHolde
return bitmap;
}
})
.displayer(new FadeInBitmapDisplayer(FADE_IN_TIME) {
.displayer(new FadeInBitmapDisplayer(FADE_IN_TIME, true, true, false) {
@Override
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) {
boolean loadedFromMemoryCache = loadedFrom == LoadedFrom.MEMORY_CACHE;
if (loadedFromMemoryCache) {
imageAware.setImageBitmap(bitmap);
} else {
super.display(bitmap, imageAware, loadedFrom);
}
super.display(bitmap, imageAware, loadedFrom);
if (usePalette)
setColors(holder.paletteColor, holder);
}