简体   繁体   English

从AutoCompleteTextView删除字母

[英]Remove letter from AutoCompleteTextView

I use a AutoCompleteTextView for login form . 我将AutoCompleteTextView用于login form But i want remove a character if he is here. 但是我想删除一个character如果他在这里。

Exemple : User login is : 784589. But if we write !784589, we delete "!" 示例用户登录名是:784589。但是,如果我们输入!784589,则会删除“!”。 character. 字符。

It's possible ? 这是可能的 ?

I've found a solution : 我找到了解决方案:

 AutoCompleteTextView textView5 = (AutoCompleteTextView) findViewById(R.id.userName);

        if (textView5.getText().toString().contains("#")) {
            textView5.setError(getResources().getString(R.string.connect_error));
        }
        else{
            (...)
        }

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

相关问题 如何从自动完成文本视图中删除以前选择的项目 - How to remove previous selected item from autocompletetextview autoCompleteTextView 仅在删除字母后显示结果 - autoCompleteTextView shows results only after deleting a letter 如何从Java中的单词中删除重复的字母 - How to remove repeated letter from words in Java 有效地从字符串中删除单个字母子字符串 - Effeciently remove single letter substrings from a string 使用java从字符串中删除双字母 - Remove doubled letter from a string using java Kotlin - 如何使用重载减号和 for 循环从 Word 中删除字母? - Kotlin - How to remove Letter from Word with Overloading Minus and for Loops? 使用 ZE83AED3DDF4667DEC0DAAAACB2BB3BE0BZ 时如何从字符串中删除一个字母 - how do you remove a letter from a string when using substring 每次在用户输入中找到字母时,从字母ArrayList中删除字母 - Remove letter from an ArrayList of letters each time it is found in input of user 从字符串中删除所有空格和标点符号(不是字母的任何东西)? - Remove all spaces and punctuation (anything not a letter) from a string? AutoCompleteTextView不显示从内部存储器加载的字符串 - AutoCompleteTextView is not showing strings loaded from the Internal Storage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM