By default, Android rejects the on-screen keyboard when the user presses "Submit" on the keyboard or clicks on Button
in the user interface. However, I am creating a messaging application and would like to keep the soft keyboard on the screen, even if the user clicks the Submit button or any other button in the user interface. This is standard behavior for messaging applications (like Facebook or Google Hangouts messaging features), so I know that it can be done.
I tried the sentences here (return true
from the method onEditorAction
OnEditorActionListener
) and here ( InputMethodManager.SHOW_FORCED
). The first seems to be working on API 2.3, but to no avail on 4.2. The latter did not work at all.
Any suggestions would be appreciated.
source
share