diff options
author | Brad Pitcher <bradpitcher@gmail.com> | 2019-04-11 22:25:24 -0700 |
---|---|---|
committer | Brad Pitcher <bradpitcher@gmail.com> | 2019-04-11 22:25:24 -0700 |
commit | 210afaeb3c6ebee13d0d18a4b797cde58e3d7434 (patch) | |
tree | 44aa24f0e1cf1cdfdf2ac44ad952ab031746fe9b /core/src/main | |
parent | f2af5192e68d756380556f8420caff2d5095ae97 (diff) | |
download | AntennaPod-210afaeb3c6ebee13d0d18a4b797cde58e3d7434.zip |
fix widget image glider
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java index dbf80cf37..4a192d2a0 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/PlayerWidgetJobService.java @@ -17,6 +17,7 @@ import android.view.View; import android.widget.RemoteViews; import com.bumptech.glide.Glide; +import com.bumptech.glide.request.RequestOptions; import de.danoeh.antennapod.core.R; import de.danoeh.antennapod.core.glide.ApGlideSettings; @@ -101,14 +102,12 @@ public class PlayerWidgetJobService extends SafeJobIntentService { try { Bitmap icon = null; - int iconSize = getResources().getDimensionPixelSize( - android.R.dimen.app_icon_size); + int iconSize = getResources().getDimensionPixelSize(android.R.dimen.app_icon_size); icon = Glide.with(PlayerWidgetJobService.this) - .load(media.getImageLocation()) .asBitmap() - .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) - .centerCrop() - .into(iconSize, iconSize) + .load(media.getImageLocation()) + .apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY)) + .submit(iconSize, iconSize) .get(); views.setImageViewBitmap(R.id.imgvCover, icon); } catch (Throwable tr) { |