From 56521b11064a8276a4785a7e6fdeb488c84bad07 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 19 Jul 2018 08:08:23 +0200 Subject: [PATCH] Can enlarge comments images. --- .../android/comunic/client/ui/adapters/CommentsAdapter.java | 6 +++--- app/src/main/res/layout/comment_item.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java index 76025bf..bcbcd5b 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/CommentsAdapter.java @@ -15,6 +15,7 @@ import org.communiquons.android.comunic.client.data.models.UserInfo; import org.communiquons.android.comunic.client.data.models.Comment; import org.communiquons.android.comunic.client.ui.listeners.onPostUpdateListener; import org.communiquons.android.comunic.client.ui.utils.UiUtils; +import org.communiquons.android.comunic.client.ui.views.EnlargeableWebImageView; import org.communiquons.android.comunic.client.ui.views.LikeButtonView; import java.util.ArrayList; @@ -90,13 +91,12 @@ class CommentsAdapter extends ArrayAdapter { ((TextView) view.findViewById(R.id.comment_text)).setText(comment.getContent()); //Update comment image (if any) - ImageView commentImage = view.findViewById(R.id.comment_image); + EnlargeableWebImageView commentImage = view.findViewById(R.id.comment_image); if(comment.getImage_url().length() < 5) commentImage.setVisibility(View.GONE); else { commentImage.setVisibility(View.VISIBLE); - ImageLoadHelper.remove(commentImage); - ImageLoadHelper.load(context, comment.getImage_url(), commentImage); + commentImage.loadURL(comment.getImage_url()); } diff --git a/app/src/main/res/layout/comment_item.xml b/app/src/main/res/layout/comment_item.xml index b47fdf2..e605179 100644 --- a/app/src/main/res/layout/comment_item.xml +++ b/app/src/main/res/layout/comment_item.xml @@ -33,7 +33,7 @@ tools:text="A comment content" /> -