aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-07-16 13:18:31 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-07-16 13:18:31 +0000
commitc093ef62fe506ba3c39a06ac902c6e549b5f0df9 (patch)
treedb291bac6c6dfe26020ef4ec3ec9ab0b79ab6dd5 /app/src/main/java
parent45181aa712dc248686c50bda6249e3811d68ba1d (diff)
downloadinfinity-for-reddit-c093ef62fe506ba3c39a06ac902c6e549b5f0df9.tar
infinity-for-reddit-c093ef62fe506ba3c39a06ac902c6e549b5f0df9.tar.gz
infinity-for-reddit-c093ef62fe506ba3c39a06ac902c6e549b5f0df9.tar.bz2
infinity-for-reddit-c093ef62fe506ba3c39a06ac902c6e549b5f0df9.tar.lz
infinity-for-reddit-c093ef62fe506ba3c39a06ac902c6e549b5f0df9.tar.xz
infinity-for-reddit-c093ef62fe506ba3c39a06ac902c6e549b5f0df9.tar.zst
infinity-for-reddit-c093ef62fe506ba3c39a06ac902c6e549b5f0df9.zip
Rounded coners in images in PostGalleryActivity.
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java
index 97509970..005e65f4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java
@@ -5,7 +5,6 @@ import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -21,7 +20,10 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestManager;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
+import com.bumptech.glide.load.resource.bitmap.CenterCrop;
+import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestListener;
+import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
@@ -73,6 +75,7 @@ public class RedditGallerySubmissionRecyclerViewAdapter extends RecyclerView.Ada
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (holder instanceof ImageViewHolder) {
glide.load(redditGalleryImageInfoList.get(position).imageUrlString)
+ .apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(48)))
.listener(new RequestListener<Drawable>() {
@Override
@@ -90,7 +93,6 @@ public class RedditGallerySubmissionRecyclerViewAdapter extends RecyclerView.Ada
.into(((ImageViewHolder) holder).imageView);
if (redditGalleryImageInfoList.get(position).payload != null) {
- Log.i("asdfasdf", "asdf ");
((ImageViewHolder) holder).progressBar.setVisibility(View.GONE);
((ImageViewHolder) holder).closeImageView.setVisibility(View.VISIBLE);
}