android - Can't detect star/multiply or comma being pressed -


title pretty clear guess.i tried many ways,onkeylisteners,dispatchkeyevent, onkeydown...none work keycode_numpad_multiply , keycode_star , keycode_comma , keycode_numpad_comma. what's issue ? it's working fine enter , back.here of ways i've tried detect.i'm trying on nexus 10,if matters.

@override public boolean onkeydown(int keycode, keyevent event) {     if ((keycode == keyevent.keycode_back)) {         showdialog3();         return true;     }     if ((keycode == keyevent.keycode_numpad_comma)) {         edittext eddd = (edittext) getcurrentfocus();         eddd.append(".");         return true;     }      if ((keycode == keyevent.keycode_numpad_multiply)) {         enter();         return true;     }      return super.onkeydown(keycode, event); } 

another try :

 @override public boolean dispatchkeyevent(keyevent event) {     if (event.getkeycode() == keyevent.keycode_enter) {         if (event.getaction() == keyevent.action_up) {              enter();              return true;         }      }     if (event.getkeycode() == keyevent.keycode_star) {         if (event.getaction() == keyevent.action_up) {              enter();              return true;         }          if ((event.getkeycode() == keyevent.keycode_numpad_comma)) {             edittext eddd = (edittext) getcurrentfocus();             eddd.append(".");             return true;         }      }     return super.dispatchkeyevent(event); }; 

i tried setting onkeylistener edittexts i'm using,didn't work. what's wrong... ? bug or sort ? , have nice weekend !


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -