From 1292a8b40a2cbbdcc9a811b3aa0c13912662923a Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Wed, 13 Sep 2023 23:56:59 -0400 Subject: Continue adding Card Layout 3. --- .../adapters/HistoryPostRecyclerViewAdapter.java | 20 ++++++++++++++++++++ .../infinityforreddit/utils/APIUtils.java | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java index 0b605ec7..f2abbf7c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java @@ -2055,6 +2055,26 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter imageRequestBuilder = mGlide.load(url).listener(((PostMaterial3CardWithPreviewViewHolder) holder).glideRequestListener); + + if (blurImage) { + imageRequestBuilder.apply(RequestOptions.bitmapTransform(new BlurTransformation(50, 10))) + .into(((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostCard3WithPreview); + } else { + imageRequestBuilder.centerInside().downsample(mSaveMemoryCenterInsideDownsampleStrategy).into(((PostMaterial3CardWithPreviewViewHolder) holder).binding.imageViewItemPostCard3WithPreview); + } + } } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java index 72f6df70..0293ad5b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/APIUtils.java @@ -23,7 +23,6 @@ public class APIUtils { public static final String IMGUR_API_BASE_URI = "https://api.imgur.com/3/"; public static final String PUSHSHIFT_API_BASE_URI = "https://api.pushshift.io/"; public static final String REVEDDIT_API_BASE_URI = "https://api.reveddit.com/"; - public static final String STRAPI_BASE_URI = "https://strapi.reddit.com"; public static final String STREAMABLE_API_BASE_URI = "https://api.streamable.com"; public static final String CLIENT_ID_KEY = "client_id"; -- cgit v1.2.3