Disabled Glides diskcache for album arts and added placeholders to workaround the fact that the lib needs a bit to long to set the error drawable.
This commit is contained in:
parent
ee2b661eb4
commit
d3c6872438
14 changed files with 30 additions and 3 deletions
|
|
@ -11,6 +11,7 @@ import android.net.Uri;
|
|||
import android.widget.RemoteViews;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.request.Request;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
|
|
@ -66,6 +67,7 @@ public class MusicPlayerWidget extends AppWidgetProvider {
|
|||
albumArtRequest = Glide.with(context)
|
||||
.loadFromMediaStore(MusicUtil.getAlbumArtUri(song.albumId))
|
||||
.asBitmap()
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
.skipMemoryCache(true)
|
||||
.listener(new RequestListener<Uri, Bitmap>() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue