adding a bottom input field for writing messages

This commit is contained in:
tibbi 2020-04-04 10:24:42 +02:00
parent 2fa899b05c
commit bd4269c3c9
4 changed files with 56 additions and 1 deletions

View File

@ -1,8 +1,10 @@
package com.simplemobiletools.smsmessenger.activities
import android.os.Bundle
import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.smsmessenger.R
import com.simplemobiletools.smsmessenger.adapters.ThreadAdapter
import com.simplemobiletools.smsmessenger.extensions.config
import com.simplemobiletools.smsmessenger.extensions.getMessages
import com.simplemobiletools.smsmessenger.helpers.THREAD_ID
import com.simplemobiletools.smsmessenger.helpers.THREAD_NAME
@ -38,5 +40,11 @@ class ThreadActivity : SimpleActivity() {
}.apply {
thread_messages_list.adapter = this
}
thread_type_message.setColors(config.textColor, config.primaryColor, config.backgroundColor)
thread_send_message.applyColorFilter(config.textColor)
thread_send_message.setOnClickListener {
}
}
}

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFF"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
</vector>

View File

@ -3,12 +3,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/thread_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/tiny_margin">
<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:clipToPadding="false"
android:overScrollMode="ifContentScrolls"
android:padding="@dimen/activity_margin"
@ -28,4 +30,39 @@
<include layout="@layout/fastscroller_handle_vertical" />
</com.simplemobiletools.commons.views.FastScroller>
<View
android:id="@+id/message_divider"
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"
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.9"
android:background="?selectableItemBackgroundBorderless"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_send_vector" />
</RelativeLayout>

View File

@ -1,4 +1,5 @@
<resources>
<string name="app_name">Simple SMS Messenger</string>
<string name="app_launcher_name">SMS Messenger</string>
<string name="type_a_message">Type a message…</string>
</resources>