java - IME_ACTION_DONE seems to destroy the View.OnKeyListener on Android -


i have edittext view on relativelayout, , can capture soft input keyboard keycode keycode_enter (int 66). key listener:

myedittext.setonkeylistener(new view.onkeylistener()    {     @override      public boolean onkey(view v, int keycode, keyevent event)      {        log.d("softinput", "key received!");      }   }); 

the problem soft keyboard displays key labeled "next" , need display "done". when (successfully) change key "done" using api:

myedittext.setimeoptions(editorinfo.ime_action_done); 

the key listener stops working , can no longer receive anything in key listener. logcat doesnt show anything. literally stops working. when remove above line of code, works again key displays "next".

i guessing clearing other flag required notify keys, using editorinfo.ime_action_next works perfect, soft key, of course displays "next".

anybody knows workaround this? or reasons why happens?

thanks.

you have edittext, variable "mytextview". setting key listener correctly edittext ?


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -