diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt index 8e942bfb..95007916 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -260,8 +260,9 @@ class ThreadAdapter( holder.viewClicked(message) } - thread_mesage_attachments_holder.removeAllViews() if (message.attachment?.attachments?.isNotEmpty() == true) { + thread_mesage_attachments_holder.beVisible() + thread_mesage_attachments_holder.removeAllViews() for (attachment in message.attachment.attachments) { val mimetype = attachment.mimetype when { @@ -272,6 +273,8 @@ class ThreadAdapter( thread_message_play_outline.beVisibleIf(mimetype.startsWith("video/")) } + } else { + thread_mesage_attachments_holder.beGone() } } } diff --git a/app/src/main/res/layout/item_attachment_image.xml b/app/src/main/res/layout/item_attachment_image.xml index 633f03f9..6c12b04e 100644 --- a/app/src/main/res/layout/item_attachment_image.xml +++ b/app/src/main/res/layout/item_attachment_image.xml @@ -5,5 +5,4 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:adjustViewBounds="true" - android:paddingBottom="@dimen/medium_margin" app:shapeAppearanceOverlay="@style/roundedImageView" /> diff --git a/app/src/main/res/layout/item_sent_message.xml b/app/src/main/res/layout/item_sent_message.xml index 2db0bdc9..2760f71d 100644 --- a/app/src/main/res/layout/item_sent_message.xml +++ b/app/src/main/res/layout/item_sent_message.xml @@ -5,7 +5,7 @@ android:id="@+id/thread_message_holder" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/medium_margin" + android:layout_marginTop="@dimen/small_margin" android:foreground="@drawable/selector" android:paddingStart="@dimen/activity_margin" android:paddingEnd="@dimen/activity_margin"> @@ -23,6 +23,7 @@ android:id="@+id/thread_mesage_attachments_holder" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginVertical="@dimen/tiny_margin" android:divider="@drawable/linear_layout_vertical_divider" android:orientation="vertical" android:showDividers="middle" /> @@ -44,6 +45,7 @@ android:layout_height="wrap_content" android:layout_below="@+id/thread_mesage_attachments_holder" android:layout_alignParentEnd="true" + android:layout_marginVertical="@dimen/tiny_margin" android:autoLink="email|web" android:background="@drawable/item_sent_background" android:padding="@dimen/normal_margin"