mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-27 15:59:29 +00:00
Display comment images
This commit is contained in:
parent
20911e9b2a
commit
94dc614ce6
@ -93,6 +93,16 @@ class CommentsAdapter extends ArrayAdapter<Comment> {
|
||||
//Update comment content
|
||||
((TextView) view.findViewById(R.id.comment_text)).setText(comment.getContent());
|
||||
|
||||
//Update comment image (if any)
|
||||
ImageView commentImage = view.findViewById(R.id.comment_image);
|
||||
if(comment.getImage_url().length() < 5)
|
||||
commentImage.setVisibility(View.GONE);
|
||||
else {
|
||||
commentImage.setVisibility(View.VISIBLE);
|
||||
ImageLoadManager.remove(commentImage);
|
||||
ImageLoadManager.load(context, comment.getImage_url(), commentImage);
|
||||
}
|
||||
|
||||
|
||||
//Update comment likes
|
||||
LikeButtonView like = view.findViewById(R.id.like_button);
|
||||
|
@ -32,6 +32,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="A comment content" />
|
||||
|
||||
<!-- Comment image -->
|
||||
<ImageView
|
||||
android:id="@+id/comment_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:contentDescription="@string/comment_image_description"/>
|
||||
|
||||
<!-- Comment like button -->
|
||||
<org.communiquons.android.comunic.client.ui.views.LikeButtonView
|
||||
android:id="@+id/like_button"
|
||||
|
@ -136,4 +136,5 @@
|
||||
<string name="popup_editcomment_confirm">Edit</string>
|
||||
<string name="popup_editcomment_edit_placeholder">New content for the comment</string>
|
||||
<string name="err_update_comment_content">An error occurred while trying to update comment content !</string>
|
||||
<string name="comment_image_description">Comment image</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user