Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想抓住软键盘的任何键的按下。至少 Enter & Backspace 键。
我试过了:
OnKeyListener
onKeyDown
dispatchKeyEvent
onEditorAction
没有任何效果。是的,我知道所有这些方法都只能保证硬件按键事件,但是在这种情况下我必须做什么才能知道 Enter(例如)被按下?