android–AutoCompleteTextView输入文本和数字

android–AutoCompleteTextView输入文本和数字,第1张

概述我们在MDE设备上有一个AS400解决方案.此应用程序的屏幕是24x23标志.人们只使用状态,大小,损坏等数字来处理应用程序.文件始终是数字和文本.在新的应用程序中,他们应该有可能使用数字和文本.我为每个州定义了8个ImageButton和8个AutoCompleteTextViews.我如何处理它,当Emplo

我们在MDE设备上有一个AS400解决方案.
此应用程序的屏幕是24 x 23标志.

人们只使用状态,大小,损坏等数字来处理应用程序.

文件始终是数字和文本.
在新的应用程序中,他们应该有可能使用数字和文本.

我为每个州定义了8个Imagebutton和8个autoCompleteTextVIEws.
我如何处理它,当Employee输入例如96时,我切换到下一个autoCompleteTExteVIEws(如果它是单匹配).

或者你会如何解决?

解决方法:

根据你的评论,我更新了答案.
您可以添加TextWatcher并验证用户输入:

autoCompleteTextVIEw.addTextChangedListener(new TextWatcher() {    @OverrIDe    public voID onTextChanged(CharSequence s, int start, int before, int count) {        // Todo auto-generated method stub    }    @OverrIDe    public voID beforeTextChanged(CharSequence s, int start, int count,            int after) {        // Todo auto-generated method stub    }    @OverrIDe    public voID afterTextChanged(Editable s) {        if (isValID(s)) { // your method to valIDate user input           setWholeTextString(); // get whole string from your adapter or items List           jumpToNextVIEw();         }    }});
总结

以上是内存溢出为你收集整理的android – AutoCompleteTextView输入文本和数字全部内容,希望文章能够帮你解决android – AutoCompleteTextView输入文本和数字所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1117403.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存