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

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

How to convert the keycode into char or string??

Here is the example code:

public boolean onK         


        
6条回答
  •  无人及你
    2020-12-11 15:35

    Try this..

    String s="";
    
    @Override
    public boolean onKey(View v, int keyCode, KeyEvent event) {
        EditText t=(EditText)v;
        s=t.getText();  
        return false;
    }
    

提交回复
热议问题