use standard IM text input convention

pull/429/head
andrekir 2022-05-06 17:25:35 -03:00
rodzic 4b3427fe8c
commit 99dfc8014a
2 zmienionych plików z 3 dodań i 6 usunięć

Wyświetl plik

@ -59,9 +59,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) {

Wyświetl plik

@ -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"