标签:
chatText = (EditText) findViewById(R.id.chatText); chatText.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { return sendChatMessage();
//监听软键盘的状态,执行相应的方法....... } return false; } });
标签:
原文地址:http://www.cnblogs.com/spring87/p/4346363.html