diff --git a/res/layout/selected_recipient_list_item.xml b/res/layout/selected_recipient_list_item.xml index a11e73b97..9c6e4f360 100644 --- a/res/layout/selected_recipient_list_item.xml +++ b/res/layout/selected_recipient_list_item.xml @@ -1,25 +1,52 @@ - + + + android:layout_toRightOf="@+id/contact_photo_image" + android:layout_toEndOf="@+id/contact_photo_image" + android:layout_toLeftOf="@+id/delete" + android:layout_toStartOf="@+id/delete" + android:layout_marginLeft="16dp" + android:layout_marginStart="16dp" + android:drawablePadding="5dp" + android:ellipsize="marquee" + android:singleLine="true" + android:fontFamily="sans-serif" + android:textSize="16sp" /> recipients; @NonNull private final DcContext dcContext; + @NonNull private final GlideRequests glideRequests; public SelectedRecipientsAdapter(@NonNull Context context, + @NonNull GlideRequests glideRequests, @NonNull Collection existingRecipients) { - this.context = context; - this.dcContext = DcHelper.getContext(context); - this.recipients = wrapExistingMembers(existingRecipients); + this.context = context; + this.glideRequests = glideRequests; + this.dcContext = DcHelper.getContext(context); + this.recipients = wrapExistingMembers(existingRecipients); } public void add(@NonNull Recipient recipient, boolean isPush) { @@ -113,10 +119,12 @@ public class SelectedRecipientsAdapter extends BaseAdapter { dcContact = dcContext.getContact(p.getAddress().getDcContactId()); } - TextView name = v.findViewById(R.id.name); - TextView phone = v.findViewById(R.id.phone); - ImageButton delete = v.findViewById(R.id.delete); + AvatarImageView avatar = v.findViewById(R.id.contact_photo_image); + EmojiTextView name = v.findViewById(R.id.name); + TextView phone = v.findViewById(R.id.phone); + ImageButton delete = v.findViewById(R.id.delete); + avatar.setAvatar(glideRequests, p, false); name.setText(dcContact.getDisplayName()); phone.setText(dcContact.getAddr()); delete.setVisibility(modifiable ? View.VISIBLE : View.GONE); @@ -172,4 +180,4 @@ public class SelectedRecipientsAdapter extends BaseAdapter { return modifiable; } } -} \ No newline at end of file +}