aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2022-12-29 02:13:53 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2022-12-29 02:13:53 +0000
commit12333fb453df8f87da63cf038d49304378742cbb (patch)
treeb07e11a7550f12b314b10a82971f9f0dde3483ba
parent8a6eb8e025f388c9bc23e5ef30a0991eb33b7365 (diff)
downloadinfinity-for-reddit-12333fb453df8f87da63cf038d49304378742cbb.tar
infinity-for-reddit-12333fb453df8f87da63cf038d49304378742cbb.tar.gz
infinity-for-reddit-12333fb453df8f87da63cf038d49304378742cbb.tar.bz2
infinity-for-reddit-12333fb453df8f87da63cf038d49304378742cbb.tar.lz
infinity-for-reddit-12333fb453df8f87da63cf038d49304378742cbb.tar.xz
infinity-for-reddit-12333fb453df8f87da63cf038d49304378742cbb.tar.zst
infinity-for-reddit-12333fb453df8f87da63cf038d49304378742cbb.zip
Fix gallery image height in PostGalleryTypeImageRecyclerViewAdapter.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostGalleryTypeImageRecyclerViewAdapter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostGalleryTypeImageRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostGalleryTypeImageRecyclerViewAdapter.java
index 97b2ad5f..e3bdae8a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostGalleryTypeImageRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostGalleryTypeImageRecyclerViewAdapter.java
@@ -5,6 +5,7 @@ import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.TextUtils;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -83,6 +84,7 @@ public class PostGalleryTypeImageRecyclerViewAdapter extends RecyclerView.Adapte
public void onBindViewHolder(@NonNull ImageViewHolder holder, int position) {
if (ratio < 0) {
int height = (int) (400 * mScale);
+ Log.i("asdfasdf", "asdfadsf");
holder.binding.imageViewItemGalleryImageInPostFeed.setScaleType(ImageView.ScaleType.CENTER_CROP);
holder.binding.imageViewItemGalleryImageInPostFeed.getLayoutParams().height = height;
} else {
@@ -91,8 +93,6 @@ public class PostGalleryTypeImageRecyclerViewAdapter extends RecyclerView.Adapte
holder.binding.errorTextViewItemGalleryImageInPostFeed.setVisibility(View.GONE);
holder.binding.progressBarItemGalleryImageInPostFeed.setVisibility(View.VISIBLE);
- holder.binding.imageViewItemGalleryImageInPostFeed.setRatio(ratio);
-
holder.binding.imageViewItemGalleryImageInPostFeed.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {