0

创建键盘时如何获取键盘文本值

InputMethodManager imm=(InputMethodManager)getSystemService(yourActivity.this.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);

??

4

1 回答 1

2

为需要文本值的视图设置键侦听器

setOnKeyListener(new OnKeyListener() { //Make the view listen for key events
   public boolean onKey(View v, int keyCode, KeyEvent event) {
//Your code
            return true;
        }            
    });
于 2012-10-16T13:19:45.177 回答