本帖最后由 liuzhidejll 于 2010-08-26 16:59:10 编辑

解决方案 »

  1.   

    在TextView.OnEditorActionListener中的解释,EditorInfo.IME_NULL代表enter键被按下,同时判断KeyEvent.ACTION_UP是为了在按下并且松开后做出反应,避免误操作。public abstract boolean onEditorAction (TextView v, int actionId, KeyEvent event)
    Since: API Level 3Called when an action is being performed.
    Parameters
    v  The view that was clicked.
    actionId  Identifier of the action. This will be either the identifier you supplied, or EditorInfo.IME_NULL if being called due to the enter key being pressed.
    event  If triggered by an enter key, this is the event; otherwise, this is null.
    Returns    * Return true if you have consumed the action, else false. 
      

  2.   

    谢了,不准备用android系统提供的键盘准备自己搞一个键盘。这样可以自己控制事件的响应