android 访问下一个按钮事件
我不知道它是否很清楚,但我试图在按下“下一个”(键盘右下角)时执行某些操作,但我找不到它的键码。 我尝试在键码中查找“下一个”或“输入”,但没有任何真正相关的...... 有人知道吗?
(实际上,我发现输入键码是精确的,但它没有做任何事情)
I don't know if it's very clear, but i'm trying to do something when the "next" (bottom right corner of the keyboard) is pressed, and i can't find its keycode.
I have tried to look for "next" or "enter" in the keycodes but nothing really relevant...
does anyone know?
(actually, i've found the enter keycode to be precise, but it does not do anything)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在
EditText
上调用setOnEditorActionListener()
,并为EditText
提供合适的android:imeActionId
值和合适的 < code>android:imeOptions 值(例如,"actionSearch"
)。当用户点击该按钮时,您提供给setOnEditorActionListener()
的侦听器将收到通知。Call
setOnEditorActionListener()
on theEditText
, and give thatEditText
a suitableandroid:imeActionId
value and a suitableandroid:imeOptions
value (e.g.,"actionSearch"
). The listener you provide tosetOnEditorActionListener()
will be notified when the user taps that button.