mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 13:59:29 +00:00
Can enlarge comments images.
This commit is contained in:
parent
8a1a3050f4
commit
56521b1106
@ -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.data.models.Comment;
|
||||||
import org.communiquons.android.comunic.client.ui.listeners.onPostUpdateListener;
|
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.utils.UiUtils;
|
||||||
|
import org.communiquons.android.comunic.client.ui.views.EnlargeableWebImageView;
|
||||||
import org.communiquons.android.comunic.client.ui.views.LikeButtonView;
|
import org.communiquons.android.comunic.client.ui.views.LikeButtonView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -90,13 +91,12 @@ class CommentsAdapter extends ArrayAdapter<Comment> {
|
|||||||
((TextView) view.findViewById(R.id.comment_text)).setText(comment.getContent());
|
((TextView) view.findViewById(R.id.comment_text)).setText(comment.getContent());
|
||||||
|
|
||||||
//Update comment image (if any)
|
//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)
|
if(comment.getImage_url().length() < 5)
|
||||||
commentImage.setVisibility(View.GONE);
|
commentImage.setVisibility(View.GONE);
|
||||||
else {
|
else {
|
||||||
commentImage.setVisibility(View.VISIBLE);
|
commentImage.setVisibility(View.VISIBLE);
|
||||||
ImageLoadHelper.remove(commentImage);
|
commentImage.loadURL(comment.getImage_url());
|
||||||
ImageLoadHelper.load(context, comment.getImage_url(), commentImage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
tools:text="A comment content" />
|
tools:text="A comment content" />
|
||||||
|
|
||||||
<!-- Comment image -->
|
<!-- Comment image -->
|
||||||
<ImageView
|
<org.communiquons.android.comunic.client.ui.views.EnlargeableWebImageView
|
||||||
android:id="@+id/comment_image"
|
android:id="@+id/comment_image"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
Loading…
Reference in New Issue
Block a user