use standard IM text input convention

(cherry picked from commit 99dfc8014a)
This commit is contained in:
andrekir
2022-05-06 17:25:35 -03:00
parent 967f777374
commit d5642d0a03
2 changed files with 3 additions and 6 deletions

View File

@@ -57,9 +57,6 @@ class MessagesFragment : Fragment(), Logging {
// Allows textMultiline with IME_ACTION_SEND
private fun EditText.onActionSend(func: () -> Unit) {
imeOptions = EditorInfo.IME_ACTION_SEND
InputType.TYPE_TEXT_FLAG_MULTI_LINE
setRawInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES)
setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEND) {

View File

@@ -46,8 +46,8 @@
android:id="@+id/textInputLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="4dp"
android:layout_marginBottom="4dp"
android:hint="@string/send_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/sendButton"
@@ -57,6 +57,7 @@
android:id="@+id/messageInputText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine|textCapSentences"
android:maxLength="228"
android:text="" />
@@ -66,7 +67,6 @@
android:id="@+id/sendButton"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="4dp"
android:contentDescription="@string/send_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"