moving some views at the existing Thread activity

This commit is contained in:
tibbi 2020-04-06 12:44:53 +02:00
parent 6d8c889723
commit 979744cbd5
3 changed files with 45 additions and 37 deletions

View File

@ -76,7 +76,6 @@ class NewMessageActivity : SimpleActivity() {
private fun addSelectedContact(contact: Contact) {
new_message_to.setText("")
thread_type_message.requestFocus()
if (selectedContacts.map { it.id }.contains(contact.id)) {
return
}

View File

@ -48,7 +48,6 @@
android:id="@+id/messages_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/message_divider_three"
android:layout_below="@+id/message_divider_two"
android:clipToPadding="false"
android:overScrollMode="ifContentScrolls"
@ -57,39 +56,4 @@
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager"
app:stackFromEnd="true" />
<View
android:id="@+id/message_divider_three"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_above="@+id/thread_send_message"
android:background="@color/divider_grey"
android:importantForAccessibility="no" />
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/thread_type_message"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignTop="@+id/message_divider_three"
android:layout_alignParentBottom="true"
android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin"
android:layout_toStartOf="@+id/thread_send_message"
android:background="@android:color/transparent"
android:gravity="center_vertical"
android:hint="@string/type_a_message" />
<ImageView
android:id="@+id/thread_send_message"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginTop="@dimen/small_margin"
android:layout_marginEnd="@dimen/small_margin"
android:alpha="0.4"
android:background="?selectableItemBackgroundBorderless"
android:clickable="false"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_send_vector" />
</RelativeLayout>

View File

@ -6,11 +6,56 @@
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/tiny_margin">
<RelativeLayout
android:id="@+id/thread_add_contacts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<LinearLayout
android:id="@+id/selected_contacts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/activity_margin"
android:orientation="vertical" />
<View
android:id="@+id/message_divider_one"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@+id/selected_contacts"
android:background="@color/divider_grey"
android:importantForAccessibility="no" />
<com.simplemobiletools.commons.views.MyAutoCompleteTextView
android:id="@+id/new_message_to"
android:layout_width="match_parent"
android:layout_height="@dimen/normal_icon_size"
android:layout_below="@+id/message_divider_one"
android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin"
android:background="@android:color/transparent"
android:completionThreshold="2"
android:gravity="center_vertical"
android:hint="@string/send_to"
android:inputType="textCapWords"
android:textSize="@dimen/big_text_size" />
<View
android:id="@+id/message_divider_two"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@+id/new_message_to"
android:background="@color/divider_grey"
android:importantForAccessibility="no" />
</RelativeLayout>
<com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/thread_messages_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/message_divider"
android:layout_below="@+id/thread_add_contacts"
android:clipToPadding="false"
android:overScrollMode="ifContentScrolls"
android:padding="@dimen/activity_margin"