Ok in my app I have a field for the user to input a number. I have the field set to only accept numbers. When the user clicks on the field it brings up the keyboard. On the
And this is a Kotlin version:
editText.setOnEditorActionListener { v, actionId, event -> if(actionId == EditorInfo.IME_ACTION_DONE){ //Put your action there true } else { false } }