mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-21 12:21:30 +00:00
Fix group message UI
This commit is contained in:
parent
3a5f5a9a41
commit
8ad0069fec
@ -35,6 +35,7 @@
|
|||||||
android:foreground="@drawable/contact_photo_background"
|
android:foreground="@drawable/contact_photo_background"
|
||||||
android:layout_width="@dimen/conversation_item_avatar_size"
|
android:layout_width="@dimen/conversation_item_avatar_size"
|
||||||
android:layout_height="@dimen/conversation_item_avatar_size"
|
android:layout_height="@dimen/conversation_item_avatar_size"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
android:cropToPadding="true"
|
android:cropToPadding="true"
|
||||||
android:contentDescription="@string/conversation_item_received__contact_photo_description" />
|
android:contentDescription="@string/conversation_item_received__contact_photo_description" />
|
||||||
|
|
||||||
@ -55,7 +56,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/message_bubble_edge_margin"
|
android:layout_marginEnd="@dimen/message_bubble_edge_margin"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_toEndOf="@id/contact_photo_container"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
|
@ -678,6 +678,12 @@ public class ConversationItem extends LinearLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setContactPhoto(@NonNull Recipient recipient) {
|
private void setContactPhoto(@NonNull Recipient recipient) {
|
||||||
|
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)bodyBubble.getLayoutParams();
|
||||||
|
float scale = getResources().getDisplayMetrics().density;
|
||||||
|
float marginInDP = groupThread ? 44 : 8;
|
||||||
|
int marginInPX = Math.round(marginInDP * scale);
|
||||||
|
layoutParams.setMarginStart(marginInPX);
|
||||||
|
bodyBubble.setLayoutParams(layoutParams);
|
||||||
if (contactPhoto == null) return;
|
if (contactPhoto == null) return;
|
||||||
contactPhoto.setAvatar(glideRequests, recipient, true);
|
contactPhoto.setAvatar(glideRequests, recipient, true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user