How can I convert a key code into a char or string?

后端 未结 6 1459
无人共我
无人共我 2020-12-11 14:46

How to convert the keycode into char or string??

Here is the example code:

public boolean onK         


        
6条回答
  •  猫巷女王i
    2020-12-11 15:23

    Tod answer is almost complete, but when you want to settext of an edittext with this eventcode you should to add a little thing:

    sample_et.setText((char)event.getUnicodeChar()+"");
    

提交回复
热议问题