简体   繁体   English

如何捕获Android软键盘的下一个按钮事件

[英]How to catch Android soft keyboard next button event

I am using phonegap plugin for my app written for android. 我正在为我为Android编写的应用程序使用phonegap插件。 The design was completely done using html. 该设计完全使用html完成。 I want to handle the next key event in android soft keyboard during text field navigation because i have used some plugins like niceditor(which provides formatting options in text area). 我想在文本字段导航期间处理android软键盘中的下一个按键事件,因为我使用过一些插件,例如niceditor(在文本区域中提供格式化选项)。 So when i click on next button in soft keyboard from the field before to niceditor it is not moving focus to the niceditor instead app gets collapsed sometimes it closes as device does not recognize the niceditor as text field and so it is not focused on clicking next. 因此,当我从软键盘上的字段单击Niceditor之前的软键盘上的下一个按钮时,它没有将焦点移到niceditor上,而是应用程序折叠起来,有时它会关闭,因为设备无法将Niceditor识别为文本字段,因此它不专注于单击下一步。 so i want it to be handled manually. 所以我想手动处理。

Thanks in advance if anybody can help me out to get the solution. 预先感谢任何人可以帮助我获得解决方案。

  editText = (EditText)layout.findViewById(R.id.editText);

            editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {

                @Override
                public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {

                    return false;
                }
            });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM