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
Post a Comment