Skip to content

Commit 49597a8

Browse files
committed
Add some spacing between attachments and text
1 parent 0b33ec8 commit 49597a8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,9 @@ class ThreadAdapter(
260260
holder.viewClicked(message)
261261
}
262262

263-
thread_mesage_attachments_holder.removeAllViews()
264263
if (message.attachment?.attachments?.isNotEmpty() == true) {
264+
thread_mesage_attachments_holder.beVisible()
265+
thread_mesage_attachments_holder.removeAllViews()
265266
for (attachment in message.attachment.attachments) {
266267
val mimetype = attachment.mimetype
267268
when {
@@ -272,6 +273,8 @@ class ThreadAdapter(
272273

273274
thread_message_play_outline.beVisibleIf(mimetype.startsWith("video/"))
274275
}
276+
} else {
277+
thread_mesage_attachments_holder.beGone()
275278
}
276279
}
277280
}

app/src/main/res/layout/item_attachment_image.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
android:layout_width="wrap_content"
66
android:layout_height="wrap_content"
77
android:adjustViewBounds="true"
8-
android:paddingBottom="@dimen/medium_margin"
98
app:shapeAppearanceOverlay="@style/roundedImageView" />

app/src/main/res/layout/item_sent_message.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
android:id="@+id/thread_message_holder"
66
android:layout_width="match_parent"
77
android:layout_height="wrap_content"
8-
android:layout_marginTop="@dimen/medium_margin"
8+
android:layout_marginTop="@dimen/small_margin"
99
android:foreground="@drawable/selector"
1010
android:paddingStart="@dimen/activity_margin"
1111
android:paddingEnd="@dimen/activity_margin">
@@ -23,6 +23,7 @@
2323
android:id="@+id/thread_mesage_attachments_holder"
2424
android:layout_width="match_parent"
2525
android:layout_height="wrap_content"
26+
android:layout_marginVertical="@dimen/tiny_margin"
2627
android:divider="@drawable/linear_layout_vertical_divider"
2728
android:orientation="vertical"
2829
android:showDividers="middle" />
@@ -44,6 +45,7 @@
4445
android:layout_height="wrap_content"
4546
android:layout_below="@+id/thread_mesage_attachments_holder"
4647
android:layout_alignParentEnd="true"
48+
android:layout_marginVertical="@dimen/tiny_margin"
4749
android:autoLink="email|web"
4850
android:background="@drawable/item_sent_background"
4951
android:padding="@dimen/normal_margin"

0 commit comments

Comments
 (0)