diff --git a/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt b/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt index 19c94a1742..abcd1429d4 100644 --- a/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt +++ b/vector/src/main/java/im/vector/app/features/form/FormEditTextWithDeleteItem.kt @@ -17,6 +17,7 @@ package im.vector.app.features.form import android.text.Editable +import android.view.inputmethod.EditorInfo import android.widget.ImageButton import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass @@ -70,12 +71,13 @@ abstract class FormEditTextWithDeleteItem : VectorEpoxyModel EditorInfo.IME_ACTION_NEXT + false -> EditorInfo.IME_ACTION_NONE + } holder.textInputEditText.addTextChangedListenerOnce(onTextChangeListener) diff --git a/vector/src/main/java/im/vector/app/features/poll/create/CreatePollController.kt b/vector/src/main/java/im/vector/app/features/poll/create/CreatePollController.kt index 9d825fdaca..515f59a38c 100644 --- a/vector/src/main/java/im/vector/app/features/poll/create/CreatePollController.kt +++ b/vector/src/main/java/im/vector/app/features/poll/create/CreatePollController.kt @@ -52,12 +52,14 @@ class CreatePollController @Inject constructor( title(host.stringProvider.getString(R.string.create_poll_question_title)) } + val questionImeAction = if (currentState.options.isEmpty()) EditorInfo.IME_ACTION_DONE else EditorInfo.IME_ACTION_NEXT + formEditTextItem { id("question") value(currentState.question) hint(host.stringProvider.getString(R.string.create_poll_question_hint)) singleLine(true) - imeOptions(EditorInfo.IME_ACTION_NEXT) + imeOptions(questionImeAction) maxLength(500) onTextChange { host.callback?.onQuestionChanged(it)