diff options
author | ByteHamster <info@bytehamster.com> | 2020-02-13 12:46:21 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-02-13 12:46:21 +0100 |
commit | b64769ab632f8a2a295e9484203e5b1bd2eee098 (patch) | |
tree | 629ecd796e1313a88c9f330c97d859170c268ac9 | |
parent | b39dc02109721f97bded7267e00ca8a06e4d9798 (diff) | |
download | AntennaPod-b64769ab632f8a2a295e9484203e5b1bd2eee098.zip |
Rounded chapter images
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java index cb74bb169..1171acaa5 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java @@ -11,6 +11,8 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.core.content.ContextCompat; import com.bumptech.glide.Glide; +import com.bumptech.glide.load.resource.bitmap.FitCenter; +import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.request.RequestOptions; import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.Chapter; @@ -121,7 +123,8 @@ public class ChaptersListAdapter extends ArrayAdapter<Chapter> { .apply(new RequestOptions() .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) .dontAnimate() - .fitCenter()) + .transforms(new FitCenter(), new RoundedCorners((int) + (4 * getContext().getResources().getDisplayMetrics().density)))) .into(holder.image); } } else { |