use of de.danoeh.antennapod.core.glide.PaletteBitmap in project AntennaPod by AntennaPod.
the class CoverLoader method load.
public void load() {
CoverTarget coverTarget = new CoverTarget(txtvPlaceholder, imgvCover, textAndImageCombined);
if (resource != 0) {
Glide.with(activity).clear(coverTarget);
imgvCover.setImageResource(resource);
CoverTarget.setPlaceholderVisibility(txtvPlaceholder, textAndImageCombined, null);
return;
}
RequestOptions options = new RequestOptions().diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY).fitCenter().dontAnimate();
RequestBuilder<PaletteBitmap> builder = Glide.with(activity).as(PaletteBitmap.class).load(uri).apply(options);
if (fallbackUri != null && txtvPlaceholder != null && imgvCover != null) {
builder = builder.error(Glide.with(activity).as(PaletteBitmap.class).load(fallbackUri).apply(options));
}
builder.into(coverTarget);
}
Aggregations