Android:OnEditorActionListener 未唤醒
我看到一些帖子并编写代码来检测“完成”键盘按钮上的事件。 但是当实现它时,键码返回 6,事件返回 null。有什么原因要检测 DONE 按钮事件,我想改变焦点。
textEdit5.setOnEditorActionListener(new OnEditorActionListener() {
public boolean onEditorAction(TextView arg0, int keycode, KeyEvent event) {
if(arg1 == KeyEvent.FLAG_EDITOR_ACTION){
btnSave.requestFocus();
return true;
}
return false;
}
);
谢谢。
I see some of post and make code to detect the event on "DONE" key pad button.
But when implement it the keycode return the 6 and event return the null.is there any why to detect the DONE button event,i want to change focus.
textEdit5.setOnEditorActionListener(new OnEditorActionListener() {
public boolean onEditorAction(TextView arg0, int keycode, KeyEvent event) {
if(arg1 == KeyEvent.FLAG_EDITOR_ACTION){
btnSave.requestFocus();
return true;
}
return false;
}
);
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请检查一下 http://dev.bostone.us/2009/11/04/android-show-and-hide-soft-keyboard-programmaticaly /#awp::2009/11/04/android-show-and-hide-soft-keyboard-programmaticaly/
谢谢。
Please check this it out http://dev.bostone.us/2009/11/04/android-show-and-hide-soft-keyboard-programmaticaly/#awp::2009/11/04/android-show-and-hide-soft-keyboard-programmaticaly/
Thank you.