HITGIF/TextFieldBoxes

"Ok" button on keyboards

Opened this issue · 1 comments

When focusing on a normal EditText, a "next" button appears on the keyboard (if there's more than one), and a "checkmark" or ok button appear on the last one before a button. Clicking on next takes you to the next EditText and clicking ok performs whatever onClick did for the button. Is there a way to reproduce this behavior using TextFieldBoxes? Currently nothing happens when clicking next or ok on the keyboard

I'm having this same problem, as the "Next" an "Done" buttons still apear in the soft keyboard but still no action is made by clicking on them.
Using android:nextFocusDown="@id/nextTextFieldId or any of the "android:nextFocus[...]" won't work.

The way I'm working this around is the following [KOTLIN]:

val editText1: ExtendedEditText = findViewById(R.id.editText1)
val editText2: ExtendedEditText = findViewById(R.id.editText2)

editText1.setOnEditorActionListener { v, actionId, event ->
      if(actionId == EditorInfo.IME_ACTION_NEXT) {
            editText2.requestFocus()
      }
      true
}

Obviously this is not an appropriate solution, as you need to add an OnEditorActionListener to every field you use. So hopefully this issue will be solved.