From 854e125079504dc450bb1a51a0ec6e8830477a4b Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 13 Apr 2020 10:04:06 +0200 Subject: [PATCH] highlight selected messages at the Conversation screen --- .../simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt | 1 + app/src/main/res/layout/activity_thread.xml | 3 ++- app/src/main/res/layout/item_received_message.xml | 5 ++++- app/src/main/res/layout/item_sent_message.xml | 5 ++++- app/src/main/res/layout/item_thread_error.xml | 2 ++ 5 files changed, 13 insertions(+), 3 deletions(-) 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 4b151db5..37784677 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/adapters/ThreadAdapter.kt @@ -179,6 +179,7 @@ class ThreadAdapter( private fun setupView(view: View, message: Message) { view.apply { + thread_message_holder.isSelected = selectedKeys.contains(message.id) thread_message_body.text = message.body thread_message_body.beVisibleIf(message.body.isNotEmpty()) diff --git a/app/src/main/res/layout/activity_thread.xml b/app/src/main/res/layout/activity_thread.xml index 38be3a0e..1f6a78a7 100644 --- a/app/src/main/res/layout/activity_thread.xml +++ b/app/src/main/res/layout/activity_thread.xml @@ -72,7 +72,8 @@ android:layout_below="@+id/thread_add_contacts" android:clipToPadding="false" android:overScrollMode="ifContentScrolls" - android:padding="@dimen/activity_margin" + android:paddingTop="@dimen/activity_margin" + android:paddingBottom="@dimen/activity_margin" android:scrollbars="none" app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" app:stackFromEnd="true" /> diff --git a/app/src/main/res/layout/item_received_message.xml b/app/src/main/res/layout/item_received_message.xml index 27194385..604fdef5 100644 --- a/app/src/main/res/layout/item_received_message.xml +++ b/app/src/main/res/layout/item_received_message.xml @@ -6,7 +6,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" - android:layout_marginBottom="@dimen/medium_margin"> + android:layout_marginBottom="@dimen/medium_margin" + android:foreground="@drawable/selector" + android:paddingStart="@dimen/activity_margin" + android:paddingEnd="@dimen/activity_margin"> + android:layout_marginBottom="@dimen/medium_margin" + android:foreground="@drawable/selector" + android:paddingStart="@dimen/activity_margin" + android:paddingEnd="@dimen/activity_margin">