ITEEDU

Android监听Enter回车事件

	edit.setOnKeyListener(tweetEnterHandler);
        private View.OnKeyListener editEnterHandler = new View.OnKeyListener() {
	    public boolean onKey(View v, int keyCode, KeyEvent event) {
	      if (keyCode == KeyEvent.KEYCODE_ENTER
	          || keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
	        if (event.getAction() == KeyEvent.ACTION_UP) {
	          //事件主体
	        }
	        return true;
	      }
	      return false;
	    }
	};