好吧,我不知道应该如何调用它。任何人都可以建议我如何做下面的事情?
因此,当用户完成以某种格式编写文本时,该文本将被“阻止”,以后用户可以在需要时删除整个“阻止”文本,而不是逐个字符。
最佳答案
这就是所谓的“筹码”。至少根据 Roman Nurik 在 this G+ post 中的说法.
A growing trend across social and communication-related apps is to afford recipient selection using tokenized auto-completing text fields. This kind of UI is more concise than list-based interfaces, and more visually rich, intuitive (exposes a better mental model), and directly manipulable (manage recipients by touching their token) than comma-separated text fields.
它基本上是一个高度定制的MultiAutoCompleteTextView
。您可以从 repository 获取它的实现。 。一个示例是在 AOSP 消息(即 SMS)应用程序中,检查 RecipientsEditor类(class)。看起来很复杂。
关于android - 在 EditText 中“阻止”特定格式的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24006052/