diff --git a/android/app/src/main/java/top/ourfor/app/iplayx/page/home/MediaViewCell.java b/android/app/src/main/java/top/ourfor/app/iplayx/page/home/MediaViewCell.java index 8d78b72..a426af8 100644 --- a/android/app/src/main/java/top/ourfor/app/iplayx/page/home/MediaViewCell.java +++ b/android/app/src/main/java/top/ourfor/app/iplayx/page/home/MediaViewCell.java @@ -11,7 +11,9 @@ import androidx.constraintlayout.widget.ConstraintLayout; import androidx.core.content.ContextCompat; +import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions; +import com.bumptech.glide.request.RequestOptions; import lombok.val; import top.ourfor.app.iplayx.R; @@ -26,6 +28,7 @@ import top.ourfor.app.iplayx.view.infra.TextView; public class MediaViewCell extends ConstraintLayout implements UpdateModelAction { + private static final RequestOptions options = new RequestOptions().transform(new RoundedCorners(DeviceUtil.dpToPx(8))); private MediaModel model; private MediaCellBinding binding; private TextView nameLabel; @@ -64,6 +67,7 @@ public <T> void updateModel(T object) { .load(imageUrl) .placeholder(isAlbum ? R.drawable.hand_drawn_3 : R.drawable.abstract_3) .transition(DrawableTransitionOptions.withCrossFade()) + .apply(options) .into(coverImage); if (model instanceof EmbyMediaModel media) { if (media.getUserData() != null && media.getUserData().getUnplayedItemCount() != null) { diff --git a/android/app/src/main/java/top/ourfor/app/iplayx/page/login/SiteViewCell.java b/android/app/src/main/java/top/ourfor/app/iplayx/page/login/SiteViewCell.java index 0e3a18d..1976a99 100644 --- a/android/app/src/main/java/top/ourfor/app/iplayx/page/login/SiteViewCell.java +++ b/android/app/src/main/java/top/ourfor/app/iplayx/page/login/SiteViewCell.java @@ -9,6 +9,9 @@ import androidx.annotation.NonNull; import androidx.constraintlayout.widget.ConstraintLayout; +import com.bumptech.glide.load.resource.bitmap.RoundedCorners; +import com.bumptech.glide.request.RequestOptions; + import lombok.extern.slf4j.Slf4j; import lombok.val; import top.ourfor.app.iplayx.R; @@ -24,6 +27,7 @@ @Slf4j public class SiteViewCell extends ConstraintLayout implements UpdateModelAction { + private static final RequestOptions options = new RequestOptions().transform(new RoundedCorners(DeviceUtil.dpToPx(24))); private SiteModel model; SiteCellBinding binding = null; @@ -60,6 +64,7 @@ public <T> void updateModel(T object) { GlideApp.with(this) .load(model.avatarUrl()) .placeholder(R.drawable.avatar) + .apply(options) .into(binding.siteImage); } diff --git a/android/app/src/main/java/top/ourfor/app/iplayx/view/EpisodeCellView.java b/android/app/src/main/java/top/ourfor/app/iplayx/view/EpisodeCellView.java index 52f7356..d3a2c46 100644 --- a/android/app/src/main/java/top/ourfor/app/iplayx/view/EpisodeCellView.java +++ b/android/app/src/main/java/top/ourfor/app/iplayx/view/EpisodeCellView.java @@ -19,7 +19,7 @@ import top.ourfor.app.iplayx.model.EmbyMediaModel; public class EpisodeCellView extends ConstraintLayout implements UpdateModelAction { - private static RequestOptions options = new RequestOptions().transform(new RoundedCorners(DeviceUtil.dpToPx(5))); + private static final RequestOptions options = new RequestOptions().transform(new RoundedCorners(DeviceUtil.dpToPx(5))); EpisodeCellBinding binding = null; public EpisodeCellView(@NonNull Context context) {