4

By default, Android dismisses the on-screen keyboard when a user presses Send on the keyboard or clicks on a Button on the UI. However, I am building a messaging app, and would like to keep the soft keyboard on the screen even if a user clicks Send or any other button on the UI. This is the standard behavior for messaging apps (Facebook's messages functionality, for example, or Google Hangouts), so I know it can be done.

I have tried the suggestions here (returning true from the onEditorAction method of OnEditorActionListener) and here (InputMethodManager.SHOW_FORCED). The first seems to work on API 2.3, but was unsuccessful on 4.2. The latter didn't work at all.

Any suggestions would be appreciated.

Community
  • 1
  • 1
Andre Gregori
  • 1,150
  • 1
  • 10
  • 17

0 Answers0