mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-27 07:49:28 +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.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<Comment> {
|
||||
((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());
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
tools:text="A comment content" />
|
||||
|
||||
<!-- Comment image -->
|
||||
<ImageView
|
||||
<org.communiquons.android.comunic.client.ui.views.EnlargeableWebImageView
|
||||
android:id="@+id/comment_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
|
Loading…
Reference in New Issue
Block a user