From 615f202583a98caca608d0d8c05ee46cd619698b Mon Sep 17 00:00:00 2001 From: andrekir Date: Thu, 2 Sep 2021 12:18:54 -0300 Subject: [PATCH 1/4] minor adjustments, reformat & contentDescription added to messages_fragment.xml --- app/src/main/res/layout/messages_fragment.xml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/messages_fragment.xml b/app/src/main/res/layout/messages_fragment.xml index 8a2f54ff8..acbfe90d4 100644 --- a/app/src/main/res/layout/messages_fragment.xml +++ b/app/src/main/res/layout/messages_fragment.xml @@ -33,8 +33,8 @@ android:id="@+id/messageInputText" android:layout_width="match_parent" android:layout_height="wrap_content" - android:maxLength="200" android:imeOptions="actionDone" + android:maxLength="200" android:text="" /> @@ -42,15 +42,12 @@ \ No newline at end of file From 15161862f335a173c71ae80a20b9e3df5fcf78b5 Mon Sep 17 00:00:00 2001 From: andrekir Date: Sun, 5 Sep 2021 15:10:02 -0300 Subject: [PATCH 2/4] Fix: EditText with textMultiLine & IME_ACTION_SEND --- app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt | 5 ++++- app/src/main/res/layout/messages_fragment.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt index b483a5a3b..68f85c4df 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/MessagesFragment.kt @@ -1,6 +1,7 @@ package com.geeksville.mesh.ui import android.os.Bundle +import android.text.InputType import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -28,6 +29,8 @@ import java.util.* // Allows usage like email.on(EditorInfo.IME_ACTION_NEXT, { confirm() }) fun EditText.on(actionId: Int, func: () -> Unit) { + setImeOptions(EditorInfo.IME_ACTION_SEND) // Force "SEND" IME Action + setRawInputType(InputType.TYPE_CLASS_TEXT) // Suppress ENTER but allow textMultiLine setOnEditorActionListener { _, receivedActionId, _ -> if (actionId == receivedActionId) { @@ -239,7 +242,7 @@ class MessagesFragment : ScreenFragment("Messages"), Logging { // requireActivity().hideKeyboard() } - binding.messageInputText.on(EditorInfo.IME_ACTION_DONE) { + binding.messageInputText.on(EditorInfo.IME_ACTION_SEND) { debug("did IME action") val str = binding.messageInputText.text.toString().trim() diff --git a/app/src/main/res/layout/messages_fragment.xml b/app/src/main/res/layout/messages_fragment.xml index acbfe90d4..77c60101b 100644 --- a/app/src/main/res/layout/messages_fragment.xml +++ b/app/src/main/res/layout/messages_fragment.xml @@ -33,7 +33,7 @@ android:id="@+id/messageInputText" android:layout_width="match_parent" android:layout_height="wrap_content" - android:imeOptions="actionDone" + android:inputType="textMultiLine" android:maxLength="200" android:text="" /> From 0e20ec78db8bdb397c3bd0d549266f9513b1407b Mon Sep 17 00:00:00 2001 From: srichs <> Date: Mon, 6 Sep 2021 22:43:33 -0600 Subject: [PATCH 3/4] removed hints from channel inputs --- app/src/main/res/layout/channel_fragment.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/res/layout/channel_fragment.xml b/app/src/main/res/layout/channel_fragment.xml index b834136f3..af5ea0dbb 100644 --- a/app/src/main/res/layout/channel_fragment.xml +++ b/app/src/main/res/layout/channel_fragment.xml @@ -22,7 +22,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:digits="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890- " - android:hint="@string/channel_name" android:imeOptions="actionDone" android:maxLength="15" android:singleLine="true" @@ -92,8 +91,7 @@ + android:layout_height="wrap_content" />