Can enlarge comment image.

This commit is contained in:
Pierre HUBERT 2018-08-15 16:40:39 +02:00
parent 5e754f24bc
commit 80fa7567eb
2 changed files with 6 additions and 8 deletions

View File

@ -10,13 +10,12 @@ import android.widget.ImageView;
import android.widget.TextView;
import org.communiquons.android.comunic.client.R;
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
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.UserInfo;
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 org.communiquons.android.comunic.client.ui.views.WebUserAccountImage;
import java.util.ArrayList;
@ -75,15 +74,14 @@ class CommentsAdapter extends ArrayAdapter<Comment> {
@Nullable UserInfo user, final onPostUpdateListener listener) {
//Update user name and account image
ImageView accountImage = view.findViewById(R.id.user_account_image);
WebUserAccountImage accountImage = view.findViewById(R.id.user_account_image);
TextView accountName = view.findViewById(R.id.user_account_name);
if (user == null) {
accountImage.setImageDrawable(UiUtils.getDrawable(context,
R.drawable.default_account_image));
accountImage.removeUser();
accountName.setText("");
} else {
ImageLoadHelper.load(context, user.getAcountImageURL(), accountImage);
accountImage.setUser(user);
accountName.setText(user.getDisplayFullName());
}

View File

@ -7,7 +7,7 @@
android:orientation="horizontal">
<!-- User name and image-->
<ImageView
<org.communiquons.android.comunic.client.ui.views.WebUserAccountImage
style="@style/CommentUserImage"
android:id="@+id/user_account_image"
android:layout_width="@dimen/account_image_small_width"