Enter key on EditText hitting onKey twice

前端 未结 7 1921
暖寄归人
暖寄归人 2021-01-07 18:25

I\'ve attached an OnKeyListener to an EditText. I\'ve overrode the onKey handler to capture a KeyEvent.

When a user hits the enter key (either their computer enter

7条回答
  •  不要未来只要你来
    2021-01-07 19:22

    This event is fired by KeyEvent.ACTION_DOWN and KeyEvent.ACTION_UP. I have done debugging and finally I realize that there is an param called KeyEvent event that I never use, then I checked and found the problem.

提交回复
热议问题